0

Sometimes when there's higher traffic on my website, the server randomly stops doing anything and sends 500/503 errors for a few seconds or even minutes.

The Error log shows the following message whenever someone tries to open the website and receives a 500/503-error:

mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper

mod_fcgid configurations:

<IfModule mod_fcgid.c>
 FcgidMaxRequestLen 67108864

<IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
</IfModule>

  FcgidIPCDir /var/lib/apache2/fcgid/sock
  FcgidProcessTableFile /var/lib/apache2/fcgid/shm

  FcgidIdleTimeout 40
  FcgidProcessLifeTime 30
  FcgidMaxProcesses 20
  FcgidMaxProcessesPerClass 8
  FcgidMinProcessesPerClass 0
  FcgidConnectTimeout 30
  FcgidIOTimeout 45
  FcgidInitialEnv RAILS_ENV production
  FcgidIdleScanInterval 10

</IfModule>

1 Answers1

0

I would suggest you raise the number of available processes. You currently have it set to 20. I would raise it to at least 50 at the minimum.

You can get more information about the FcgidMaxProcesses Directive here:

http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxprocesses

Borgboy
  • 131
  • 3