ispconfig + fast-cgi + high load website

Discussion in 'General' started by themark, Jul 31, 2014.

  1. themark

    themark Member


    in these days we have a trouble with a website that run on wordpress (latest 3.9.1) with ispconfig (latest stable version) on php (5.3.3) and fast-cgi.

    All day long the website goes pretty well, but sometimes (basically just after a new post insert) the server load goes pretty high untill the server's block , and we receive on the log the following errors:

    [Sat Jul 26 14:01:13 2014] [warn] [client *] mod_fcgid: can't apply process slot for /var/www/php-fcgi-scripts/username/.php-fcgi-starter

    The content of ".php-fcgi-starter" is the default provided by the ispconfig template.
    The server has 5GB of RAM (centos 6.5)

    It's there a way that we can use in order to tune fast-cgi in order to serve better this request and not stuck the server load?
    Any advise it's very appreciate.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to add the following lines in the apache direktives field of the website:

    FcgidMaxProcesses 1000
    FcgidMaxProcessesPerClass 100

    another option can be to use php-fpm instead of php-fcgi for that site.
  3. themark

    themark Member

    Till but it's look like that these:

    FcgidMaxProcesses 1000
    FcgidMaxProcessesPerClass 100

    are the default value (according with apache docs:

    I have assumed that on my server the value are already this. What i'm wrong?
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The defaut value for FcgidMaxProcessesPerClass is 10 and not 100 in the vhost. Thats Why I recommended to set it to 100.
  5. themark

    themark Member

    ok thank's i'm gonna try.
    Where can I find on server the default conf for virtualhost for fcgi?
  6. themark

    themark Member

    amazing, if I write the following on the apache directory for that host:

    FcgidMaxProcesses 1000
    FcgidMaxProcessesPerClass 100
    MaxRequestLen 13107200

    the ispconfig don't write anything on the vhost.

    If i write only:

    MaxRequestLen 13107200

    the ispconfig write correctly this on the vhost.

    I Am very confused... :-( :-(
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is doing the following steps:

    1) Write new vhost config
    2) test if apache complains about vhost config and if it restarts correctly.
    3) if 2) fails, then revert to the last working configuration and save the non working vhost file with .err ending.

    So you should find a file with .err ending now in that directory.

    It might just be that your fcgid module needs the old syntax, so you can try:

    MaxProcessCount 1000
    DefaultMaxClassProcessCount 1000
  8. themark

    themark Member

    Ok found the problem (wrong apache version on ispconfig fastcgi tabs).
    The only, last, very last things it's that if I try to setup:

    FcgidMaxProcesses 1000

    on the vhosts apache give me an error:

    FcgidMaxProcesses cannot occur within <VirtualHost> section

    Instead the variable:

    FcgidMaxProcessesPerClass 100

    it's accept by my apache... :-/

  9. themark

    themark Member

    Ok found:

    Default: FcgidMaxProcesses 1000
    Context: server config

    it's available only on server config not in virtualhost.

    I'm going only to setup:

    FcgidMaxProcessesPerClass 100

    i hope that this is enough... :-/
  10. Helder Satin

    Helder Satin New Member

    Hello there Till,
    I was having the exact same problem as described here and i was thinking about changing my site from FastCGI to the PHP-FPM modes. To do so i just need to change the PHP mode on ISPconfig or do i need to do something else? I've never used a different mode than FastCGI so i dunno what else involves this change.

    Also the only FcgidMaxProcessesPerClass 100 was correctly inserted on the vhost file. The MaxProcessCount value is set to 1000 but it's commented and DefaultMaxClassProcessCount is set to 100. If i change DefaultMaxClassProcessCount to 1000 it just adds a new line at the end of the vhost file, is there any problem of having that value repeated in the vhost file?
  11. till

    till Super Moderator Staff Member ISPConfig Developer



Share This Page