I have a very large network with many clients, which pass all for an mikrotik on x86… The management system (Billing), is written in PHP, and at times is accessed by many Administrators simultaneously, when happen many API requests, the mikrotik on x86, stop responding any request to API, but, still have access winbox, ssh, telnet…
I try, in that moments, to disable and re enable api service, but not luck… so, restart x86 and everything works again…
This is not a problem of resources, the cpu usage is 20 or 30% in rush hour, and this problem occurs when cpu is at 8 or 10%..
We’re talking about 6 or 8 API requests per second … for one or two hours straight ..
this is to draw on the fly, the traffic of a given IP or interface,
Sorry bad english.
Thanks.
From the very limited tests I’ve done so far, there doesn’t seem to be a problem with letting that many connections read information at once.
The problem starts if you write a lot, while also doing a lot of reads - It appears until a “print” request is completed, RouterOS locks the menu for writing, so changing a record in the middle of it essentially forces RouterOS to delay the write until the data is read in full, and also hold up further reads until the write is done. This isn’t a problem in said limited tests I’ve done (because we’re talking miniscule scale - 3-4 connections, each doing 2-3 calls), but I can see how this could accumulate when your applications has a lot of connections, with each doing read and write stuff, and in menus with lots of entries in them.
To remedy this, PEAR2_Net_RouterOS supports “persistent connections” - all requests from your app will share the same connection, so while the application may become slower for some of the administrators, your router should remain stable at all times, since it’s always dealing with a single connection. This API client is the only one (that I know of) to support this. Note that PHP would need to run as FCGI or an Apache module for you to take advantage of this feature.
(P.S. Have you considered publishing your billing system? You know many people need similar systems.)