The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Config for mod_fcgid related to maxrequestlen and timeout

Discussion in 'General Discussion' started by sdanf, Jun 8, 2011.

  1. sdanf

    sdanf Member

    Joined:
    Jun 7, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I have mod_fcgid enabled and receive the following errors when trying to post to my site using xmlrpc, however the error has popped up a few times in other areas as well.

    Running on centos 5.

    Code:
    mod_fcgid: read data timeout in 40 seconds
    as well as

    Code:
    mod_fcgid: HTTP request length 131385 (so far) exceeds MaxRequestLen (131072)
    
    I could not find a mod_fcgid.conf file anywhere so I created one in /usr/local/apache/conf/includes/ and added an include line to my main httpd.conf file

    Inside I added:

    Code:
    <IfModule mod_fcgid.c>
    MaxRequestLen 1000000000
    IPCConnectTimeout 100
    IPCCommTimeout 1000
    </IfModule>
    
    Is this the correct place to put it, and how can I confirm 100% that these limits are being applied as the error was happening at random.

    Thanks
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I would suggest putting the include into /usr/local/apache/conf/includes/pre_main_global.conf instead of creating a new include. If you directly edit httpd.conf to add an include line, Apache rebuild or recompile will wipe that include line. The existing includes in /usr/local/apache/conf/includes directory will be automatically added if you simply distill them using:

    Code:
    /usr/local/cpanel/bin/apache_conf_distiller --update
    At that point, then rebuild Apache and restart it:

    Code:
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
     
  3. kbob

    kbob Member

    Joined:
    May 30, 2011
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @sdanf i would say a more normal place for this would be :

    Or otherwise if you are running the server with a main configuration of PHP mod_fcgi + SuExec :

    Is also a place to put these configuration changes.

    As for the error you provided initially :

    I have seen this to be caused by the fact that the script being executed requires more memory to finish up whatever it is currently executing, otherwise the site hits a Error 500 Internal server.

    Hope this can help you.
     
  4. cavamondo

    cavamondo Member

    Joined:
    May 21, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    #4 cavamondo, Nov 20, 2011
    Last edited: Nov 20, 2011
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    No, there is no way to do so.
     
  6. cavamondo

    cavamondo Member

    Joined:
    May 21, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    This fixed the issue about uploading filesize for me: MaxRequestLen setting for mod_fcgid to a higher value.

    WHM > Apache Configuration > Include Editor > Post VirtualHost Include > All

    We added this (mod_fcgid version 2.35):

    <IfModule mod_fcgid.c>
    MaxRequestLen 1000000000
    </IfModule>

    For mod_fcgid version 2.36, add this:

    <IfModule mod_fcgid.c>
    FcgidMaxRequestLen 1000000000
    </IfModule>
     
Loading...

Share This Page