I have a problem on multiple servers than using the Apache mod_fcgid module to serve a cgi script that processes the request (document check and similar processing) and then serves the files on the server based on the processing result.
I keep repeating the following errors in the logs:
[Mon Jan 30 23:11:41 2012] [warn] [client 95.35.160.193] mod_fcgid: error reading data, FastCGI server closed connection [Mon Jan 30 23:11:41 2012] [warn] [client 95.35.160.193] (32)Broken pipe: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function [Mon Jan 30 23:13:34 2012] [warn] [client 37.8.52.128] mod_fcgid: can't apply process slot for /var/www/cgi-bin/assetx.fcgi
These problems cause the server to run slowly, and in other cases lead to temporary unavailability of the service.
Servers have a lot of traffic on them, I have currently configured the following fcgi directives, as shown below:
FcgidMaxRequestsPerProcess 0 FcgidMaxProcesses 300 FcgidMinProcessesPerClass 0 FcgidIdleTimeout 240 FcgidIOTimeout 240 FcgidBusyTimeout 300
the average load on the servers is normal; the average number of processes is 250 processes.
I did research for several days about this problem, some say that this is a resolution problem, I followed their suggestion, did not help. I tried setting the parameters above, these are the final values ββthat I tried, but they did not work. I am also trying to use nginx instead of apache, but I cannot find a suitable way to run a cgi script with this high load on the server using nginx.
What can I do to fix this problem?
source share