Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Tuning FASTCGI / mod_fcgid settings from cPanel

Discussion in 'Workarounds and Optimization' started by actived, Apr 8, 2012.

  1. actived

    actived Well-Known Member

    Joined:
    Mar 30, 2012
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    56
    cPanel Access Level:
    Website Owner
    I recently changed to FAST CGI using the Apache module:
    Code:
    # This file was automatically generated by the Cpanel PHP Configuration system
    # ...
    
    # Fastcgi configuration for PHP5
    LoadModule fcgid_module modules/mod_fcgid.so
    MaxRequestsPerProcess 500
    AddHandler fcgid-script .php5 .php4 .php .php3 .php2 .phtml
    FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .php
    ...
    FCGIWrapper ...
    # End of autogenerated PHP configuration.
    I get these errors now:
    Code:
    [warn] mod_fcgid: process 1234 graceful kill fail, sending SIGKILL
    [warn] [client x.x.x.x] mod_fcgid: read data timeout in 40 seconds
    [error] [client x.x.x.x] Premature end of script headers: page1.php
    [warn] mod_fcgid: process 1446 graceful kill fail, sending SIGKILL
    [warn] mod_fcgid: process 1447 graceful kill fail, sending SIGKILL
    [warn] [client x.x.x.x] mod_fcgid: read data timeout in 40 seconds
    [error] [client x.x.x.x] Premature end of script headers: page2.php
    [warn] mod_fcgid: process 1449 graceful kill fail, sending SIGKILL
    [warn] [client x.x.x.x] mod_fcgid: read data timeout in 40 seconds
    [error] [client x.x.x.x] Premature end of script headers: page3.php
    [warn] mod_fcgid: process 1451 graceful kill fail, sending SIGKILL
    Those often come in quick succession (about 50-100 of them inside 30-60 seconds)
    Even if I restart apache, the situation repeats after about 30-45 minutes.

    Sorry for dumb question, but using CPanel interface, where do I put the tuning parameters - PHP_FCGI_MAX_REQUESTS and PHP_FCGI_CHILDREN ?
    I have so far been unable to spot the option in Apache Configuration or PHP config sections.
    I increased the php.ini memory_limit to 384M (from 256M, where it was for a long time)

    Any other PHP/Apache tuning to be performed if this is a load issue?

    TIA,
    Dave
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You can add FCGI settings for those directives in /usr/local/apache/conf/includes/post_virtualhost_global.conf file. Once you've added the directives, please ensure to restart Apache.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice