ISPC 3.0.3 - Fast-CGI questions

Discussion in 'Installation/Configuration' started by itsnedkeren, Nov 22, 2010.

  1. itsnedkeren

    itsnedkeren New Member

    Hi all,

    Where can I define the settings for Fast-CGI with ISPConfig (MaxServers, etc)?

    Yesterday I tried following a guide I found on google, as how to enable Fast-CGI with mpm-worker module for additional speed on Apache2, and that guide ended up with ruining my entire Apache config :(

    I had "Internal Server Error 500" on many pages and I had to restore from a backup as I simply couldn't remove the errors.

    Here's what I did(maybe someone can explain why it went bad):

    Code:
    #aptitude install apache2-mpm-worker libapache2-mod-fcgid
    #aptitude install php5-cgi php5-curl php5-gd php5-mysql
    added a php-fastcgi.conf file to /etc/apache2/conf.d/
    this file contained multiple settings/options set, like MaxServers, MaxProcesses and so on.

    After Apache restart, my webmail went down with error500 and my other sites was not working properly.

    If someone has time to explain me why this could have happened it would be much appreciated.

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact error messages from the error log of the website that caused that error.

    Such parameters are set in the vhost, so that global file will not be used. The settings that ispconfig uses are already optimized, so there is normally no need for any changes. If you still want to change settings, then do the changes in the vhost master template.
     
  3. itsnedkeren

    itsnedkeren New Member

    Unfortunatly i forgot to transfer the logs before I restored :(

    Thanks for the info, I'm staying with your optimized files for now.

    By the way, is it normal with Fast-CGI that it eats up all the RAM? Sites are running fine, but RAM in TOP is 50MB free.

    This is the Apache2 conf:

    #21/11-2010
    <IfModule mpm_prefork_module>
    StartServers 50
    MinSpareServers 15
    MaxSpareServers 30
    MaxClients 225
    MaxRequestsPerChild 4000
    </IfModule>

    Thanks again
     
    Last edited: Nov 23, 2010
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check under system > server config > fastcgi that "FastCGI Children" is set to 1. If it is set to a larger number, change it to 1, then go to the settings of the website and change a value (e.g. change quota) and click on save so that the config file gets rewritten.
     
  5. itsnedkeren

    itsnedkeren New Member

    Thanks Till,

    It was set to 8, so I have changed it now. Any way to verify that setting?

    And what is the difference from 8 to 1?

    Thanks again
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    A setting of 8 means that php-fcgi will start 8 processes for every apache child, so your setup uses 8 times of ram while the apache fcgi module is only able to use the first child process anyway.

    The ram usage should drop for every website where you applied that setting.
     
  7. itsnedkeren

    itsnedkeren New Member

    Excellent, thanks alot :)

    And I found the fcgi config has also changed and uncomment the child section

    /var/www/php-fcgi-scripts/web11/.php-fcgi-starter:
    Code:
    #!/bin/sh
    PHPRC="/etc/php5/cgi/"
    export PHPRC
    PHP_DOCUMENT_ROOT="/var/www/clients/client0/web11"
    export PHP_DOCUMENT_ROOT
    # The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache 
    # mod_fcgi will control the number of childs themself and never use the additional processes.
    # PHP_FCGI_CHILDREN=1
    # export PHP_FCGI_CHILDREN
    PHP_FCGI_MAX_REQUESTS=5000
    export PHP_FCGI_MAX_REQUESTS
    exec /usr/bin/php-cgi \
     $1
     

Share This Page