Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 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.

share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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