Connection reset by peer: mod_fcgid: error reading data from FastCGI server Issues

12,496

That error typically indicates that the PHP script is timing out before sending a response to the fcgi process.

Increase the values of the max_execution_time setting in your php.ini.

Share:
12,496

Related videos on Youtube

user145857
Author by

user145857

Updated on September 18, 2022

Comments

  • user145857
    user145857 almost 2 years

    Help is greatly needed for our server. We are experiencing random "Connection reset by peer: mod_fcgid: error reading data from FastCGI server" errors which cause a 500 internal server error. If the page is then reloaded it loads normally as it should.

    We are running MPM Worker with mod FCGID to handle PHP. We had APC cache enabled but disabled it recently to see if it would fix the problem, but the random mod FCGID errors are still continuing. No other opcode cache is active now.

    Our settings are below:

    <IfModule worker.c>
    MinSpareThreads 25
    MaxSpareThreads 150
    ThreadsPerChild 25
    ThreadLimit 100
    ServerLimit 700
    MaxClients 700
    MaxRequestsPerChild 0
    </IfModule>
    
    <IfModule mod_fcgid.c>
    FcgidMaxRequestLen 1073741824
    FcgidMaxRequestsPerProcess 2000
    FcgidMaxProcessesPerClass 100
    FcgidMinProcessesPerClass 0
    FcgidConnectTimeout 300
    FcgidIOTimeout 900
    FcgidFixPathinfo 1
    FcgidIdleTimeout 300
    FcgidIdleScanInterval 120
    FcgidBusyTimeout 300
    FcgidBusyScanInterval 120
    FcgidErrorScanInterval 12
    FcgidZombieScanInterval 12
    FcgidProcessLifeTime 3600
    </IfModule>
    

    The server is a 64 core 2.1 GHZ 94 GB RAM so it has some power.

    Some of the fcgid timeout settings are higher because we run large reports which take up to 15 minutes. Any help is greatly appreciated!

    Just to clarify, the random fcgid errors are occurring when a user clicks a page on our site and the 500 error page loads instantly. This is random and occurrs less than 1% of the time but it is still an issue.

    • Jongosi
      Jongosi over 8 years
      Bump! Did you ever find a solution to this issue?
  • user145857
    user145857 over 11 years
    well the problem seems to occurr instantly so it's not like pages are getting timed out. The 500 error will show when a page is getting loaded, not after it's been running, etc. any other ideas?
  • Todd Wilcox
    Todd Wilcox over 6 years
    Do you know why that fixes the problem? Are there any consequences to increasing the timeout that should be kept in mind when making this change?
  • Lucas D.A.W.
    Lucas D.A.W. over 6 years
    Increase timeout, execute reports and then decrease to default values. I think that, by default there are no consequences. That fix the problem because fcgid can break script loading.