Portal Home > Knowledgebase > Articles Database > Apache Slow only on one Server


Apache Slow only on one Server




Posted by dlewis23, 08-31-2010, 12:43 AM
I have 2 servers, they are both the exact same specs. The only difference is one has cpanel installed. The problem I am having in on the server without cpanel. Apache for some reason is super slow. I started with the exact same httpd configs but have started modifying the config and have gotten it to be a little better, but the problem is still happening. It acts like apache has reached its connections limit but it has not reached it. I have it set to 1400 and there is no more then 400 connections and plenty of free ram. Here is my current config. [PHP]Timeout 30 KeepAlive Off MaxKeepAliveRequests 150 KeepAliveTimeout 3 MinSpareServers 5 MaxSpareServers 18 StartServers 8 ServerLimit 1400 MaxClients 1400 MaxRequestsPerChild 1200/PHP] Does anyone have anything I could try? I have been messing around with this for several hours with out really getting anywhere. Thanks

Posted by InstaCarma_Support, 08-31-2010, 01:03 AM
I could see that you have set KeepAlive Off and then specified the directives. with apache versions > 1.1 KeepAlive is On by default and as you are using KeepAliive directives need not have to set it to Off. The MaxKeepAliveRequests directive limits the number of requests allowed per connection only when KeepAlive is on Also, I would suggest to keep MaxClients not more than 256, which is the default one.

Posted by madaboutlinux, 08-31-2010, 06:42 AM
Are you sure the problem is with MaxClients settings? What do to the error_logs say when the websites are inaccessible?

Posted by dlewis23, 08-31-2010, 09:01 AM
I'm pretty sure, but there is no way for me to be 100% sure. There is nothing in the error log that stands out to me, for the most part its just file does not exist things in the error log.

Posted by Techbrace, 08-31-2010, 10:35 AM
Is Apache the only service that's slow? And how about the load on the server? Check your current network traffic as well.

Posted by dlewis23, 08-31-2010, 10:56 AM
From what I can tell yes apache is the only service that is slow. The server load is always less then 0.50 and there is always about 500 - 800 MB of free ram. Network traffic isnt very high. Around 10 Mbps.

Posted by dlewis23, 08-31-2010, 04:08 PM
Anyone have any ideas for me to try? This has been a real head scratcher for me. I have been messing with it all day with no luck. I got it to a point where pages will load but they just take for ever to get started.

Posted by netmar, 08-31-2010, 04:48 PM
Something that someone mentioned in another thread was the dns resolver settings. Do you have name lookups turned on for logging? You might also have an network issue with opening new connections. It's the sort of thing that would affect apache much more than other services because of the number of connections opened to deliver even one page. Are the machines located in the same datacenter, and if so, can you test them against each other using ab?

Posted by dlewis23, 08-31-2010, 05:24 PM
Hostname lookups are off. And they are not in the same datacenter so I can't test them against each other.

Posted by -Sandro-, 08-31-2010, 06:09 PM
just a question MinSpareServers 5 MaxSpareServers 18 StartServers 8 if you set minspare lower than startservers does it mean they will be killed to match "5"?

Posted by dlewis23, 08-31-2010, 06:16 PM
Probably I removed that I'm not on to this config which is making pages load better, under 10 seconds.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read