Find the answer to your Linux question:
Results 1 to 10 of 10
Hi, I have centos 6.3 on 16GB/4 vCores Virtual Server (hosteurope.de). I'm having currently 3 domains (2 wordpress, 1 drupal). The last few days I receive a lot internal server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2013
    Posts
    10

    mod_fcgid error


    Hi,

    I have centos 6.3 on 16GB/4 vCores Virtual Server (hosteurope.de). I'm having currently 3 domains (2 wordpress, 1 drupal). The last few days I receive a lot internal server errors especially on high traffic and I've been trying to find out the root of the problem. The main error I receive is in /var/log/httpd/error_log:

    Code:
    [some_date] [warn] mod_fcgid: process 13442 graceful kill fail, sending SIGKILL
    [a_date] [error] FastCGI process 32657 still did not exit, terminating forcefully
    [a_date] [warn] mod_fcgid: cleanup zombie process 18283
    [a_date] [warn] (105)No buffer space available: connect to listener on 0.0.0.0:80
    In the logs of each website I have also:
    domain1 (wordpress), /var/www/vhosts/domain1/logs
    Code:
    [a_date] [warn] [client an_ip] mod_fcgid: read data timeout in 70 seconds, referer: myrurl
    [a_date] [warn] [client an_ip] mod_fcgid: stderr: \t\t\t\tORDER BY dp_date DESC, cntaccess DESC
    [a_date] [warn] [client an_ip] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    [a_date] [error] [client an_ip] Premature end of script headers: wp-cron.php
    [a_date] [warn] [client an_ip] (70007)The timeout specified has expired: mod_fcgid: can't get data from http client, referer: a_url

    domain2 (wordpress), /var/www/vhosts/domain2/logs
    Code:
    [a_date] [error] [client an_ip] Premature end of script headers: wp-comments-post.php, referer: a_url
    [a_date] [error] [client an_ip] Premature end of script headers: index.php, referer: a_url
    [a_date] [warn] [client an_ip] mod_fcgid: read data timeout in 70 seconds
    [a_date] [error] [client an_ip] Premature end of script headers: index.php
    domain3 (drupal) /var/www/vhosts/domain3/logs
    Code:
    [a_date] [warn] [client an_ip] mod_fcgid: stderr: PHP Warning:  Maximum number of allowable file uploads has been exceeded in Unknown on line 0, referer: a_url
    [a_date] [warn] [client an_ip] mod_fcgid: read data timeout in 70 seconds, referer: a_url
    [a_date] [error] [client an_ip] Premature end of script headers: index.php, referer: a_url
    I was checking around at the beginning how I could handle with the error of the mod_fcgid and I found some answers like increasing some parameters in /var/etc/httpd/fcgid.conf, i.e.

    Code:
     FcgidIdleTimeout 40->3600
    FcgidProcessLifeTime 30->7200
    FcgidMaxProcesses 40->64
    FcgidMaxProcessesPerClass 8
    FcgidMinProcessesPerClass 0
    FcgidConnectTimeout 30->300
    FcgidIOTimeout 70->7200
    FcgidInitialEnv RAILS_ENV production
    FcgidIdleScanInterval 10
    IPCCommTimeout  7200
    IPCConnectTimeout 180
    This has improved just the occurrence of the errors of mod_fcgi but especially on high load there is a lot of latency especially when somebody submits a comment or edit a page.

    As a consequence I tried to check whether there is any problem on the performance of the server or something wrong in the website. I tried to check the CPU usage for each website and I found out through top -c that there is high usage (30-100%) on php-cgi processes, especially on the websites that are related to wordpress, i.e.

    Code:
    /usr/bin/php-cgi -c /var/www/vhosts/system/domain1/etc/php.ini
    /usr/bin/php-cgi -c /var/www/vhosts/system/domain2/etc/php.ini
    It seems that there is something wrong with some php script. However I don't know how I could limit the possibilities of the error and actually find what is creating so much load. Any ideas?

    Thanks in advance
    Last edited by symeon_mattes; 09-21-2013 at 10:57 PM.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,746
    Are you running these services in one system, or in virtual machines?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Sep 2013
    Posts
    10
    One virtual server, one ip address, 3 domains on that server.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,746
    What do YOU mean by 3 domains? Domains as in xyzzy.com, or foobar.org?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined!
    Join Date
    Sep 2013
    Posts
    10
    yes...As I wrote at the beginning there are three domains, domain1.com (wordpress), domain2.de (wordpress), domain3.fr (drupal). The first two domains seem to create that high cpu usage and as a consequence all sites are giving the errors I mentioned.

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,746
    So, all these 3 domains are mapped to the same raw IP address?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Just Joined!
    Join Date
    Sep 2013
    Posts
    10
    yeap...why do you think is so important this information?

  9. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,746
    Without knowing how your system is configured and accessed, any attempts at diagnosis are just guesses. Without knowledge, there can be no rational understanding of the situation. I'd rather have too much information, than too little...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #9
    Just Joined!
    Join Date
    Sep 2013
    Posts
    10
    ok...that's true . Now any other advice? Actually I was trying to find if there is any mechanism I could check what makes php_cgi to use so much cpu...I don't know how I could debug it or do something for that.

  11. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,746
    Well, I am now just starting on my first major php bit of code, so I am not "expert" enough to answer that. In any case, I AM an expert in diagnosing code in just about any computer language (formal logic is one of my areas of expertise), so some code in the problematic areas (if you know what they are) would be most helpful in aiding you.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •