(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

5 posts / 0 new
Last post
#1 Mon, 10/20/2014 - 06:49
dennis

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server

[Update]SORRY! it's my mistake, I thought my step fixed this issue
but in the end, I realize it just reset my setting, then still change back to PHP5.3
Original, works fine on PHP5.3, so my step didn't do any help,
Just keep original post.....

================Original Post Below===================
I think many ppl meet this issue,I just post my easy solution for everyone reference,

[what happen]
==================================================
When I upgrade PHP version from 5.3 to 5.5, got 500 error
and I check apache error log, error msg as below:
-(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server-
-Premature end of script headers: index.php-
==================================================

[My Solution]
==================================================
1. go to virtualmin\your virtual server\server configuration\website options\
2. select "Apache mod_php (run as Apache's user)" then save
3. switch back "FCGId (run as virtual server owner)"(it will request you Run CGI scripts as domain owner)
4. Save
==================================================

after I did this, the issue gone, the website can read as usual,
If you happen same issue, hope it can help you~

Sun, 11/23/2014 - 12:01
srmobile

Very interesting - I'm having the same issue, I went from PHP 5.3.3 to PHP 5.4.16 and have the exact same behavior.

I've done what you said and the script is now working, I know I've done this solution in the past but it creeps back up again.

Can anyone explain why or how to prevent having to do this every time I need to run this specific script?

Thanks,

SR

Mon, 11/24/2014 - 09:12
andreychek

Howdy,

Hmm, I'm not sure what in the above steps is actually fixing the issue... what that would do is regenerate the PHP sections of the Apache config, along with the PHP wrapper script.

In theory though, they should all be the same as they were previously.

So I'm wondering if it's the act of restarting Apache that's correcting it.

If you were to restart Apache (making certain that all running copies of Apache are stopped in the process), does that resolve the issue?

-Eric

Fri, 03/20/2015 - 05:39
bradmca

Saved me trawling through the command line - I'm sure I buggered up the folder permissions with a recursive chmod recently but this solved it with the lovely virtualmin.

Wed, 09/18/2019 - 07:06
StefanAlbrecht
StefanAlbrecht's picture

Hello,

I've been having issues with FCGI and PHP 7.3 recently. I could not fix the error at once. I found the solution in the older discussion here. But I also tried to add "fcgidBusyTimeout" to the apache config. It didn't work. The virtualmin permission check module helped me solve the issue.

https://stackoverflow.com/questions/12153518/connection reset by peer mod fcgid error reading data from fastcgi server essay dune https://www.virtualmin.com/node/25539

Topic locked