1

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.

1
  • Bump! Did you ever find a solution to this issue? – Jongosi Dec 4 '15 at 13:01
1

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.

1
  • 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? – user145857 Nov 16 '12 at 19:25
0

Increase Timeout of Fcgid's. I have same problem and i solve with that:

fcgid-conf

2
  • 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? – Todd Wilcox Dec 18 '17 at 18:50
  • 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. – Lucas D.A.W. Dec 18 '17 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.