• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Error reading data from FastCGI server

Marco G

New Pleskian
Hi to everybody,

it has been 2 days I try to find a solution about this problem in all forums but i can't still find a solution.
First of all I have to tell this is a server has 64GB RAM and 12 cores AMD with Plesk 12 and has been running for more than one year without problem (and without any reboot). It is a server that has more than 40.000 visitors per day and process many files. It has been very stable until yesterday that we had to reboot.

The day before the server suddenly started to give this errors too:
Code:
mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
and the website was down.

So we restarted the server (took very long time to restart) and disabled cloudflare cdn (so static content will be served directly from server). After restart website do not worked. And I found a solution of someone who had the same problem and I disabled nginx:
Code:
/usr/local/psa/admin/sbin/nginxmng --disable
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all
and re-enabled and it worked, the website was running. But nginx was giving a lot of errors of read (24: Too many open files).

So following instructions from a website we edit /etc/nginx/nginx.conf and we added
worker_rlimit_nofile 30000; and 4 workers. At the same time we activated cloudflare cdn. The problem seemed solved but we had many random errors on error_log from log registers of a domain in Plesk:

Code:
[Tue Oct 14 00:47:59 2015] [warn] [client xxx.xxx.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.domain.com/page
[Tue Oct 14 00:47:59 2015] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: index.php, referer: http://www.domain.com/page

Before reboot we also had sometimes this errors but there were like 20 per day, now are like 300 per day.

After that I reset the default nginx.conf and the website was still stable, so maybe was the cdn that was inactive that caused read (24: Too many open files) but is strange because I think static files are served directly thru apache.

Obviously I modify /etc/httpd/conf.d/fcgid.conf to see if something changes but it didn't worked, or maybe I mess up the last config of fcgid and the current is the one that causes the problems... this is the current fcgid.conf:
Code:
<IfModule mod_fcgid.c>

<IfModule !mod_fastcgi.c>
    AddHandler fcgid-script fcg fcgi fpl
</IfModule>

  FcgidIPCDir /var/run/mod_fcgid/sock
  FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

  FcgidIdleTimeout 300
  FcgidProcessLifeTime 3600
  FcgidMaxProcesses 1000
  FcgidMaxProcessesPerClass 16
  FcgidMinProcessesPerClass 5
  FcgidConnectTimeout 300
  FcgidIOTimeout 1800
  FcgidInitialEnv RAILS_ENV production
  FcgidIdleScanInterval 10
  FcgidMaxRequestLen 1073741824
  FcgidBusyTimeout 1800
  FcgidIdleScanInterval 480
</IfModule>
More info: the /var/log/httpd/suexec_log shows many lines like:
Code:
[2015-10-15 10:48:57]: uid: (10001/user) gid: (503/503) cmd: cgi_wrapper

The website is running now, but I can't reproduce the error as user so I installed a code to error_doc/internal_server_error.html and error_doc/maintenance.html to track users with this erros, and I get some, but less than the errors displayed in the error_log. I don't know if mod_fcgid: error reading data from FastCGI server error happens users can see this error page or the page it is empty.

Another thing to notice is the CPU consumption of web apache has changed since reboot:

303068e4_o.jpeg


All of this is the information I have until now.
Thank you very much for your support
 
Last edited:
Back
Top