The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_fcgid: error reading data from FastCGI server

Discussion in 'General Discussion' started by imploder303, Feb 2, 2011.

  1. imploder303

    imploder303 Registered

    Joined:
    Sep 29, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I usually don't need to post questions, but this is driving me crazy:eek:. I'm running a Cpanel box with apache/mod_fcgid/php5/eaccelerator.
    I switched to mod_fcgid from su_php and it runs extremely well, except for this minor glitch:
    Code:
    Wed Feb 02 12:44:38 2011] [error] [client xxx.xxx.xxx.xx] Premature end of script headers: index.php, referer: http://www.xxx.com/xxxx/
    [Wed Feb 02 12:44:38 2011] [warn] [client xxx.xxx.xxx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.xxx.com/xxxx/
    
    This is a random error that throws a 500 page when it happens. I tried different configurations for fcgi with no positive results, but I found out one odd fact: this error occurs every exact 4 minutes, at 38 seconds, no matter how many times I restart apache, it shows up every time at xx:xx:38 201x.

    I checked for mod_fcgid options with 240 seconds, custom or default, and I didn't find any. Of course, this is a high-traffic server, so errors appear often related to the site that's taking this traffic.

    I'll appreciate any clues, hints or solutions!
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have APC and/or Zend Optimizer active on the machine?

    I realize that EAccelerator is being used and I've found similar errors such as "Connection reset by peer: mod_fcgid: error reading data from FastCGI server" in researching systems with Zend + APC running together. It's possible that Zend Optimizer, EAccelerator and/or APC (if this is being used) are contributing to the issue.

    You might try disabling any or all of these by commenting them out of the global php.ini file at /usr/local/lib/php.ini and restarting Apache to see the results.
     
  3. imploder303

    imploder303 Registered

    Joined:
    Sep 29, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi Tristan, thanks for your answer.
    Unfortunately, the error persisted disabling eaccelerator or zend optimizer and both at the same time. APC is not installed at all. Any clues? Thank you!
     
  4. xanubi

    xanubi Well-Known Member

    Joined:
    Jun 28, 2006
    Messages:
    86
    Likes Received:
    1
    Trophy Points:
    8
    I've one sugestion. If you have the configserver firewall, see the parameter PT_USERMEM and put it to ZERO. That parameter on fastcgi can kill php processes, causing that problem.

    If you don't have this, try to disable IONCUBE and Frontpage.
     
  5. imploder303

    imploder303 Registered

    Joined:
    Sep 29, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi Xanubi, thanks for the tip. Unfortunately it didn't make it. I even disabled completely the firewall with no luck. Nevertheless is worth noting that might impact so I left the setting as you suggested, thank you.

    What really bugs me is that the error shows up every exactly four minutes, at second 38, like it was a cron or something. I've checked every possible clue, including apache support lists, and recompiled with Apache php 5.2.16 with no luck so far. Mod_fcgid still is 2.3.5 even though version 2.3.6 is out, is it possible to update this module within cpanel?

    Thanks for your help.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hello,

    Would you be able to open a ticket using the link in my signature or in WHM > Support Center > Contact cPanel area? This way we can see if we can determine why this might be happening.

    If you do open a ticket, please post the ticket number here.

    Thanks.
     
  7. SherifBuzz

    SherifBuzz Member

    Joined:
    Dec 2, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I've been having similar issues, I was wondering if you managed to reach a solution
     
  8. cehis

    cehis Registered

    Joined:
    May 24, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello.
    I have this problem.

    How i Can fix it.

    [Mon Jun 13 10:54:39 2011] [warn] [client xxx.xxx.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
    [Mon Jun 13 10:54:39 2011] [error] [client xxx.xxx.xxx] Premature end of script headers: login.php

    Thanks.
     
  9. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you have homeloader.so enabled in your /usr/local/lib/php.ini file on the machine in question?
     
  10. boonjackmedia

    boonjackmedia Active Member

    Joined:
    Apr 28, 2010
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cincinnati, OH USA
    Tristan, if he had homeloader.so enabled would it cause a conflict? If so, what's the fix, advice?

    I'm curious because I have homeloader.so and have had mod_fcgid glitches for awhile now, so I'm stalking related threads... in a good way though of course.
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Here is a discussion about homeloader.so being enabled:

    http://forums.cpanel.net/f5/case-44...h-php-causes-random-memory-errors-140821.html

    It has been shown to cause memory errors for some scripts and other assorted errors. To quote my post in that thread:

    My advice would be to comment out the module in your php.ini and see if the errors quit happening. It shouldn't be used with FCGI.
     
  12. imploder303

    imploder303 Registered

    Joined:
    Sep 29, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I finally solved this issue, PRM was the culprit, killing PHP processes. Because of the nature of FCGI, they tend to grow in memory use, so they would get killed with those results.
    Bottom line, processes managers like these should be configured or avoided.
    FCGI works well with some configuration, though, as CPanel staff states, should be avoided by unexperienced users, specially if traffic is uneven between hosted sites, requiring special vhost parameters to avoid "process slot" problems.

    I tested mod_fcgid 2.3.6 too, but it doesn't respect vhost parameters so it tends to go unstable, so I don't recommend it.

    Thanks Tristan and all for your kind support, I hope this helps anyone with this problem in the future.
     
  13. SherifBuzz

    SherifBuzz Member

    Joined:
    Dec 2, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Please provide us with more details - which PRM are you referring to, what steps did you take to resolve the issue.

    This is a common problem and as much detail as possible would go a long way to helping others.
     
  14. cPanelJamyn

    cPanelJamyn Social Engineer
    Staff Member

    Joined:
    Jan 29, 2009
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    0
  15. SherifBuzz

    SherifBuzz Member

    Joined:
    Dec 2, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thank you, is this included by default ? I'm pretty sure I don't have it running.

    I am having the same issues as in this thread and have hit a brick wall trying to fix it. Are there any other leads on how to resolve this issue ?
     
Loading...

Share This Page