Modify 'default' apache2 rate-limiting?

September 12, 2015 5.6k views
Ubuntu Apache PHP

Hi all!

I have a webserver where I have bots that ping (via url to a PHP page) the server continuously – Many times per minute.

It seems that after around 3 days some kind of rate limiting / throttling. Which is fixed by a reboot.

I’m not sure how to look for the root cause of this, because I need to be able to let these bots ping the server all they want.

(My server is a “default” UBUNTU server where I followed the tutorial to install LAMP – so I dont believe I have anything “special” enabled).

If it’s not an apache thing, could it be a firewall thing?

1 Answer

Apache has a KeepAlive and KeepAliveTimeout setting that can pose an issue in these instances. If KeepAlive is set to true, then the server will not close a connection after delivering it’s content, rather it will keep it open for additional requests. Turning off the KeepAlive setting in your apache configuration will most likely prevent the server from becoming unreachable after a time as it will then close open connections as soon as it’s work is done, leaving them available to serve new requests.

Have another answer? Share your knowledge.