0

In the midst of transferring a website from a GoDaddy shared server to an EC2 instance. Handling the traffic, which during peak times on a typical day is around 300 active visitors, has been problematic to say the least. My CPU usage slowly rises and eventually hits 100% leaving the website essentially unusable. I've been attempting to resolve the issues from my error logs and was wondering if there could be a more significant problem to address.

After looking at the Apache error log I increased MaxClients [prefork (256) / worker (300) / serverlimit (256)] ==> (500 / 500 / 500).

After looking at the PHP error log I increased [pm.max_children (50) / pm.start_servers (5) / pm.min_spare_servers (5) / pm.max_spare_servers (35)] ==> (100, 10, 10, 70)

Even with these numbers I continue to have warnings: [23-Feb-2014 04:34:47] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 7 idle, and 83 total children

Artificially increasing these numbers doesn't appear to be long term solution. Any ideas?

0

First, do you have a PHP opcode cache installed? If you don't have, you should install it, it should reduce the load. APC is the most used one.

If that doesn't help, then you should analyze your PHP application / database closer to see what part of it is so heavy that it causes the high load. You have given no information on the software you run on your website, so it is difficult to give any detailed advice.

  • Thanks for the response Tero. At the moment I have APC and Memcache installed and am attempting to optimally configure W3 Total Cache. – panoramic Feb 26 '14 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.