I'am currently pulling my hairs out: After upgrading from Debian wheezy to jessie we get Apache mod_fcgid errors sometimes.
Current setup:
- Debian GNU/Linux 8.6 (jessie) / 3.16.0-4-amd64
- Apache/2.4.10 (Debian)
- PHP 5.6.29-0+deb8u1
Some of the Apache sites are just running fine and some sites are presenting a nice error 500 after several reloads. The Apache log shows
[fcgid:warn] [pid 23714] (104)Connection reset by peer: [client 123.456.789.12:53191] mod_fcgid: error reading data from FastCGI server
[fcgid:warn] [pid 23714] (104)Connection reset by peer: [client 123.456.789.12:53191] mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
The strange thing is, that this error occurs only from time to time. As a user, I can just do a page reload again and everything is fine again. I know I'm not the first one with this error and I tried several things so far, but nothing helped.
What I already did:
- Setting
FcgidOutputBufferSize 0
in /etc/apache2/mods-available/fcgid.conf -> No difference - Stetting
PHP_FCGI_MAX_REQUESTS=99999
in the wrapper script -> No difference - Setting
FcgidMaxRequestsPerProcess 500
in /etc/apache2/mods-available/fcgid.conf -> No difference - Increasing
FcgidMaxRequestsPerProcess
to 3600 in /etc/apache2/mods-available/fcgid.conf -> No difference
Any ideas? Thanks in advance.
Martin
I hate to say this, but updating from one Debian version to another (ex: from Wheezy to Jessie) can be messy and not always work perfectly. There is a multitude of things that can go wrong, and cause anomalous behavior.
Anyway, what I would do here (which may or not work), is that first I would look at all custom configuration files and scripts you had on the machine before the update and investigate if they would still work on the new version.
Next, I would make sure that I have an encompassing repository list
/etc/apt/sources.list
such as:After that, run
apt-get update
and then run the following code -- IMPORTANT: the following code may overwrite custom configuration files (if you have any) for your programs:After that,
reboot
and check if the problem is still present.Next step would be to remove (purge) both the
apache
andphp
packages (if possible for you), and then reboot and reinstall them again. For example:After that,
reboot
and check if the problem is still present.If at this point you still have problems, I would consider reinstalling the entire OS from scratch. I updated many Debian machines from a version to another and there were too many issues in too many machines, so that I don't do it anymore, instead I install the OS from scratch.
I hope this helps, good luck.