0

Our Apache server crashes whenever we have short bursts of traffic (200+ users at a given time). We have to manually restart it to get it back online.

I'm hoping to find out some common issues that we could look into to resolve this issue. Please let me know any details that could help troubleshoot this further.


Error Log

[mpm_prefork:error] [pid 13775] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

prefork settings

<IfModule mpm_prefork_module>
        StartServers              16
        MinSpareServers           24
        MaxSpareServers           50
        MaxRequestWorkers         100
        MaxConnectionsPerChild    0
</IfModule>

DigitalOcean Droplets

Web Server

  • Ubuntu 14.04 x64
  • 1GB Ram / 1 Core / 30GB SSD / 2TB Transfer
  • Laravel 5.0

MySQL Database Server

  • Ubuntu 14.04 x64
  • 1GB Ram / 1 Core / 30GB SSD / 2TB Transfer
  • max_connections: unlimited

We experience a crash whenever we get a spike in traffic:

server graphs

Aaron
  • 199
  • 1
  • 1
  • 9
  • 1
    Is there anything in the error logs around that time? Any interesting response codes in the access log? – Tim Jan 21 '16 at 20:19
  • @Tim Updated to include error log message. – Aaron Jan 21 '16 at 23:29
  • That's quite a traffic spike. Would you consider that normal traffic for 200 users? If that's not normal traffic have you done any log analysis with a tool like scalp or ruled out an ddos or intrusion attempt? – Jchieppa Jan 22 '16 at 06:25

1 Answers1

0

The error log you posted says "consider raising the MaxRequestWorkers setting". This will allow more simultaneous connections.

I suggest you consider raising the MaxRequestWorkers setting then report back. If you don't know how, Google is your friend, but it looks like you found it already.

Use something like Siege for performance and scalability testing, preferably in your test environment.

Tim
  • 30,383
  • 6
  • 47
  • 77