Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer
    
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 at 23:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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