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.

Apache, FD_SETSIZE & Seg Faults

Discussion in 'EasyApache' started by KingmanMe, Mar 3, 2003.

  1. KingmanMe

    KingmanMe Active Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Any advice here is appreciated. With the FD_SETSIZE broken in buildapache.sea a few days ago Apache was spitting out FD_SETSIZE errors which was soon followed by Perl stopping working and sometimes an Apache failure. The only way to restore from either scenario was a httpd stop > httpd start.

    The new buildapache.sea comes out with the raise FD_SETSIZE fixed which brings another problem with it. Segmentation Faults popping up very regularly in the Apache error_log soon followed by some functions of PHP failing (fopen, remote file related) then sometimes an Apache fail. Again, the only solution is to stop then start Apache.

    I'm stuck between a rock and a hard place on this and have tried multiple recompiles, taking PHP down to the minimum module list, etc.

    1. Raise FD_SETSIZE > Seg Faults > PHP/Apache crash (every 90 mins or so)
    2. Don't raise FD_SETSIZE > No Seg Faults but no FD_SETSIZE warnings > Perl/Apache crash (every 90 mins or so)

    Any pointers?

    Cpanel 6.0.0-S97
    Multiple buildapache.sea
    PHP 4.3.1 (tried 4.2.3)
    No such probs on other similar servers.

    TIA
     
  2. norm

    norm Well-Known Member

    Joined:
    Apr 23, 2002
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    I'm having the exact same problem.

    Last week I had issues with FD Size Limit, a new buildapache was prepared so I used that one, now every hour or so, I'm getting Segmentation faults (as reported in /etc/httpd/logs/error_log)

    I'm on the same cpanel build and same apache version as you
     
  3. norm

    norm Well-Known Member

    Joined:
    Apr 23, 2002
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    When Apache/PHP segfault's, some elements of PHP fail to operate, such as 'fopen'.

    PHP pages that have include statements report:

    [function.main]: failed to create stream: HTTP request failed!

    When apache is stopped/started, the page loads fine again.
     
  4. ozzi4648

    ozzi4648 Guest

    I did not rebuilt from buildapache.sea since installing v5 but I too was getting these errors after the v6 upgrade. For some reason i have not seen those errors in 4 days but Apache still needs to be restarted daily otherwise sites are not served. I wonder when they are going to fix all these problems. We shouldnt even have to rebuild apache in the first place. I wish somebody whos anybody from CPanel would reply with comforting words but nobody does. Not dbraco not the guy from nixhosting nobody. And i thought we were going to start seeing some people who know what their talking about in these forums. Looks like for $60 per month you can expect Zero support in the forums and everyone is just wasting thier time posting. Good thing i didnt shell out 1500 for the entire suite. If this is the kind of response i will be getting for my money they can go jump.
     
  5. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
  6. ozzi4648

    ozzi4648 Guest

    I know what a file handle is. Lord, are you trying to tell me that all of a sudden the masses have all of a sudden reached critical file handle levels by coincidence? I dont think thats true at all. We only have but 40 sites 40% of which have real sites running the rest dont even resolve. One our box of 250 sites we have never see a file handle problem yet its has 256k less memory and 60% run some kind of forum board.
     
  7. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Actually cPanel used to patch the system header files to increase the FD_SETSIZE. Since so many people asked us not to do that we took out the patch, and changed it so it only increases durning apache compile time.
     
  8. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Check your system limits as well. If you FD_SETSIZE is set higher then the ulimit this could cause this.


    You should check your ulimit


    ulimit -n.

    If its low

    try

    ulimit -n 16384
    /etc/rc.d/init.d/httpd stop
    killall -9 httpd
    /etc/rc.d/init.d/httpd start
     
  9. ozzi4648

    ozzi4648 Guest

    On our box its

    root@srv05 [/var/log]# ulimit -n
    4096

    Which seems way to low
     
    #9 ozzi4648, Mar 4, 2003
    Last edited by a moderator: Mar 4, 2003
  10. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    425
    Likes Received:
    0
    Trophy Points:
    16
    I am also having the same proble, and after i tried to raise the limit it again rolls back to 4k , this is strange :(, and this thing is driving me crazy, I have just set a Crontab to restart Apache every 1 hrs.

    NICK, PLEASE WAKE UP....... DO SOMETHING
     
  11. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Im having the same problem,
    Has anyone managed to come up with a solution?
     
  12. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    425
    Likes Received:
    0
    Trophy Points:
    16
    I have already mailed them twice with no status..What is happening. Some one Please come up a solution, This is a big PAIN :(
     
  13. thomas

    thomas Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    We had the same problems with FD_SETSIZE, compiling using shaun's buildapache.sea fixed that, but now we have problems with some PHP functions (fsockopen). :(
     
  14. KingmanMe

    KingmanMe Active Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Everything has been fine here after using the 6th March buildapache. A pointer:

    pico /etc/rc.d/init.d/httpd

    Make sure the ulimit -n line at the top of there is set to the higher limit.
     
  15. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    425
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Where can i find Shauns Buildapache ?

    Regards,
     
  16. thomas

    thomas Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    See his post in THIS thread.
     
  17. Darkedge

    Darkedge Active Member

    Joined:
    Aug 16, 2001
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    hrm

    Does that ulimit command work for freebsd 4.7 as well or is that only for redhat. I am still having issues with php stuff not working. Shauns build fixed the fildescriptor and seg faults but people are comlaining that certaing php functions are not working.
     
  18. thomas

    thomas Well-Known Member

    Joined:
    Mar 31, 2002
    Messages:
    70
    Likes Received:
    0
    Trophy Points:
    6
    Re: hrm

    Not sure about freebsd, but try running the cmd in SSH.

    ulimit -n
     
  19. furquan

    furquan Well-Known Member

    Joined:
    Jul 27, 2002
    Messages:
    425
    Likes Received:
    0
    Trophy Points:
    16
    ulimit -n did the job for me :)

    m not sure about freebsd
     
  20. Darkedge

    Darkedge Active Member

    Joined:
    Aug 16, 2001
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Nope

    cpanel# ulimit
    ulimit: Command not found.

    I guess its not there. SO anyone got any ideas. THe main complaint is that people are saying that the fopen_url stuff is nto working.
     
Loading...

Share This Page