Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Location
    Who knows
    Posts
    269

    mod_fcgid: can't apply process slot for

    Hi all,
    I'm having error log with this error "mod_fcgid: can't apply process slot for /home/MY DOMAIN/fcgi-bin/php5.fcgi"

    Server running process became 400+ Ram used 1.4GB out of 2GB

    VPS with Virtualmin Control Panel
    Debian OS
    2GB RAM

    Please help me here.
    Learn a lot in WHT many expert have helped me out...

  2. #2
    Join Date
    Jan 2013
    Location
    Virginia Beach, Va
    Posts
    52

    Post Setting FastCGI defaults

    It looks like you're using FastCGI as your PHP handler, which by default has some pretty low limits associated with it, especially for MaxProcessCount. Since you're on a VPS you can bump up the defaults a bit to allow more concurrent PHP processes to run at once, and stop these types of errors from happening.

    You might want to ask your host about this depending on how they have things configured for you. In my case the default settings for FastCGI are adjusted here:

    /usr/local/apache/conf/php.conf

    Here are the settings I've been using that seem to work in most cases:

    Code:
    # Fastcgi configuration for PHP5
    LoadModule fcgid_module modules/mod_fcgid.so
    MaxRequestsPerProcess 500
    MaxProcessCount 3
    MaxRequestLen 33554432
    IPCCommTimeout 60
    IdleTimeout 120
    IdleScanInterval 30
    BusyTimeout 120
    BusyScanInterval 90
    ErrorScanInterval 3
    ZombieScanInterval 3
    ProcessLifeTime 3600
    If it's not your FastCGI limits that are causing these errors, I've also seen it where you need to correct permissions to (755) on the log directory FastCGI tries to use. I think in your case that'd be /var/log/virtualmin/, other common places to check would be /var/log/httpd and /usr/local/apache/logs/.

    Hope that helps, good luck.

    - Jacob

  3. #3
    Join Date
    Jul 2011
    Location
    Who knows
    Posts
    269
    Quote Originally Posted by JacobN View Post
    It looks like you're using FastCGI as your PHP handler, which by default has some pretty low limits associated with it, especially for MaxProcessCount. Since you're on a VPS you can bump up the defaults a bit to allow more concurrent PHP processes to run at once, and stop these types of errors from happening.

    You might want to ask your host about this depending on how they have things configured for you. In my case the default settings for FastCGI are adjusted here:

    /usr/local/apache/conf/php.conf

    Here are the settings I've been using that seem to work in most cases:

    Code:
    # Fastcgi configuration for PHP5
    LoadModule fcgid_module modules/mod_fcgid.so
    MaxRequestsPerProcess 500
    MaxProcessCount 3
    MaxRequestLen 33554432
    IPCCommTimeout 60
    IdleTimeout 120
    IdleScanInterval 30
    BusyTimeout 120
    BusyScanInterval 90
    ErrorScanInterval 3
    ZombieScanInterval 3
    ProcessLifeTime 3600
    If it's not your FastCGI limits that are causing these errors, I've also seen it where you need to correct permissions to (755) on the log directory FastCGI tries to use. I think in your case that'd be /var/log/virtualmin/, other common places to check would be /var/log/httpd and /usr/local/apache/logs/.

    Hope that helps, good luck.

    - Jacob
    Hi Jacob, Thank you so much for replying,
    actually i try to find /usr/local/apache/conf/php.conf but i couldn't find apache directory in usr/local

    for your 2nd option yes i have already change directory permission to 755 but still i face the same problem so i want to try your 1st option yet i couldn't find the file php.conf on ubuntu using apache2 / php5

    Thank you
    Last edited by anthonyinit; 01-04-2013 at 09:38 AM.
    Learn a lot in WHT many expert have helped me out...

  4. #4
    Join Date
    Jul 2011
    Location
    Who knows
    Posts
    269
    is there anything to edit here?
    /etc/apache2/mods-available/fcgid.conf
    Learn a lot in WHT many expert have helped me out...

  5. #5
    Join Date
    Jan 2013
    Location
    Virginia Beach, Va
    Posts
    52
    Quote Originally Posted by anthonyinit View Post
    is there anything to edit here?
    /etc/apache2/mods-available/fcgid.conf
    Hello Anthony,

    No problem at all for the help.

    Yes it does look like in your case you'd need to modify that file more than likely:

    Code:
    /etc/apache2/mods-available/fcgid.conf
    Another way to check is by taking a look at the includes in your Apache httpd.conf file. If you don't know the location on your server you should be able to use:

    Code:
    locate httpd.conf
    It will typically be in a .../apache/conf/httpd.conf location. Once you find the file run:

    Code:
    grep Include /usr/local/apache/conf/httpd.conf
    That will spit back all your Apache includes, more than likely you'll see the path to your fcgid.conf there, confirming that configuration is getting applied into Apache.

    You might have something currently along the lines of:

    Code:
    <IfModule mod_fcgid.c>
      AddHandler    fcgid-script .fcgi
      FcgidConnectTimeout 20
    </IfModule>
    Below your AddHandler line, is where you can set all the settings for FastCGI. Just use the same rules I mentioned before, you probably don't need to use all of them, as that errors is typically just from the MaxProcessCount 3 rule not being there. However in my experience the other settings are also helpful from a maximizing performance, and reducing errors standpoint for FastCGI. Since for instance without the MaxRequestLen 33554432 being set, you could encounter upload errors from your PHP scripts.

    Let me know if that did the trick for you.

    - Jacob

  6. #6
    Join Date
    Jul 2011
    Location
    Who knows
    Posts
    269
    Hi again Jacob,
    my httpd.conf also located in the same directory
    /etc/apache2
    but there is nothing on the file it is blank, however apache2.conf has many details

    in my fcgid.conf file i see exactly same thing u mention
    <IfModule mod_fcgid.c>
    AddHandler fcgid-script .fcgi
    FcgidConnectTimeout 20
    </IfModule>
    so i edit that file and add what you mansion before now it looks like this
    <IfModule mod_fcgid.c>
    AddHandler fcgid-script .fcgi
    FcgidConnectTimeout 20
    MaxProcessCount 3
    MaxRequestLen 33554432
    </IfModule>
    hope this way is correct, i don't have much experience on these things and my server is unmanaged. one more thing about a week ago i contacted my hosting company and seek their help and they told me that my issue is more likely FcgidMaxProcesses and FcgidMaxRequestLen exact the same thing you mention but i didn't know how and where to edit this but thanks to you now i know which file to edit, now that i edit these value i should give sometime and see if this will fix my issue and i will keep you posted

    once i thank you so much for your support.
    Learn a lot in WHT many expert have helped me out...

  7. #7
    Quote Originally Posted by anthonyinit View Post
    Hi all,
    I'm having error log with this error "mod_fcgid: can't apply process slot for /home/MY DOMAIN/fcgi-bin/php5.fcgi"

    Server running process became 400+ Ram used 1.4GB out of 2GB

    VPS with Virtualmin Control Panel
    Debian OS
    2GB RAM

    Please help me here.
    Why don't u use mod_php or suphp or dso ?

  8. #8
    Join Date
    Jul 2011
    Location
    Who knows
    Posts
    269
    JacobN
    So far no crash found in 2 days i guess u helped me troubleshoot my issue. server running smooth apache2 running smooth

    Thank you so much
    Learn a lot in WHT many expert have helped me out...

  9. #9
    Join Date
    Jan 2013
    Location
    Virginia Beach, Va
    Posts
    52
    Quote Originally Posted by anthonyinit View Post
    Thank you so much
    Hey anthonyinit,

    Awesome! No problem at all, I know that's a frustrating problem to deal with, so glad to hear that worked for you.

    I've had countless VPS customers that I've had to do these steps for on our own cPanel/CentOS servers where I work <<snipped>> Thanks for getting back to me and letting me know the same tactics appear to work elsewhere as well

    Hope things keep chugging along nicely for you!

    - Jacob
    Last edited by anon-e-mouse; 02-21-2013 at 06:55 PM.

  10. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Similar Threads

  1. Apache+FastCGI - mod_fcgid: can't apply process slot
    By vbgamer45 in forum Hosting Security and Technology
    Replies: 1
    Last Post: 07-06-2011, 05:20 PM
  2. CSS, CS1.6, TF2, DoD & More! $10 10-Slot 1000FPS, $15 10-Slot 2000FPS
    By Brad Groux in forum Other Hosting Offers
    Replies: 0
    Last Post: 10-20-2010, 10:14 AM
  3. CSS, CS1.6, TF2, DoD & More! $10 10-Slot 1000FPS, $15 10-Slot 2000FPS
    By Brad Groux in forum Other Hosting Offers
    Replies: 0
    Last Post: 10-10-2010, 11:24 PM
  4. Replies: 0
    Last Post: 01-05-2010, 11:33 PM
  5. LimitZero.net - West Game Servers! $2.25/Pub Slot $1.50/Priv Slot
    By zxfire in forum Dedicated Hosting Offers
    Replies: 9
    Last Post: 05-15-2005, 01:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •