I'm using rabbitmq to make requests to another machine. My server is the latest AWS bitnami lamp implementation. The logic goes like this:
ajax POST -> requests rpc.php (in bitnami server) -> queues a message to another machine -> the other machine responds.
Now after 3-4 requests I get a 503 unavailable, probably due to the burst of the requests and maybe because the script is blocked waiting a response from the server. First I thought it was mod_evasive, which I disabled without luck. Then I thought it was from php.ini and something like max_execution_time but I set it to 10 seconds without luck again. Haven't installed any plugins whatsoever. I disabled php-fpm but does exactly the same. After these 3-4 requests the whole page becomes unavailable and works again only if I restart apache. (When I had php-fpm enabled, simply restarting fpm would make the page available again, didn't need to restart apache).
The problem is, I want something like 50 request / second without breaking anything. Any ideas?