I have a physical Ubuntu server (see some of the specs here), with Apache 2.4.7, PHP 5.5.9, mysql 14.14, mysqlite and Yii framework 1.16 installed. The server performs amazingly at first, but suddenly, given enough stress it starts to time out (80+ request/sec). At no time is any of the system resources anywhere near being capped. CPU is only up to 25%.

In the Apache error log I found the following:

server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Should I just increase that number as it says, or am I only fixing a side-effect of the problem here?

Furthermore I am not fully understanding the documentation. In the section about MaxRequestWorkers it also ties it together with the ServerLimit setting, but I am not quite sure what the two are supposed to be set to, in order to work together properly.

Other technical details that migth be of use:

  • I have disabled .htaccess files and configured the mod_rewrite through apache config instead.
  • Apache also gives the following warning, which om uncertain if it is important or not:

    apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message

  • It is the only website installed on the server.

  • Performance charts made at the time were load were the highest:

IO and network performance Other stats


Unless you can improove the perforamnced (and your code may jsut be inefficient) you will have to throw hardware at it.

At no time is any of the system resources anywhere near being capped. CPU is only up to 25%.

Normally with a database that is transactional, the CPU is the smallest problem. Check your IO load - it may be you just have not enough IO capacity for the database to handle. CPU is only one of three critical ressources, the other two being IO and memory.

  • See my updated question. Load doesn't seem to be a problem on the hardware at all (that is, if I'm reading things right). – Johny Skovdal Mar 11 '15 at 11:19
  • What does the disc IO chart show? If that is latency in milliseconds (the ONLY measurement making any sense) then yes, you do get overloaded - at lease a little. I would increase the number of workers then. – TomTom Mar 11 '15 at 12:28

You've hit server MaxRequestWorkers limit. That means when you have lots of requests most of these ar just waiting to be served and during this wait PHP times out.

Since you have still lots of resources you can safely increase MaxRequestWorkers. Also check PHP's timeout settings.

  • Could you elaborate on that? I am unsure as to what the settings ought to be? – Johny Skovdal Mar 11 '15 at 16:59
  • It depends on your application. Check webhostrepo.com/blog/… – Sam Dark Mar 11 '15 at 18:43
  • Sorry for not being more specific: You told me to check the PHP timeout settings, what should they be, compared to the MaxRequestWorkers setting? – Johny Skovdal Mar 11 '15 at 19:18
  • They don't really corellate in any known form. You can try a tool like "siege" to simulate load you have and check what settings are better for both performance and successful responses. – Sam Dark Mar 15 '15 at 20:10

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.