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.

Httpd breaking down

Discussion in 'General Discussion' started by tuxguroo, Sep 12, 2006.

  1. tuxguroo

    tuxguroo Member

    Joined:
    Aug 28, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello ,

    It has been 3 weeks since i am experiencing this problem. Httpd is going down every day . The server is not over loaded as it has only 160 domains hosted. I have installed mod security and have also set advanced rules , but it's still happening. Please help me with this ..
     
  2. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    what are your logs telling you?

    try also /sbin/service httpd configtest
     
  3. moogle

    moogle Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    What is your MaxClients set to?
    # grep MaxClients /usr/local/apache/conf/httpd.conf

    Around the time you see that apache might be going down (like if it does it every 30 mins) how many connections are there?
    # ps axf|grep httpd|wc -l
     
  4. tuxguroo

    tuxguroo Member

    Joined:
    Aug 28, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Guys, Thank s a lot

    Maxclients is set to 150
     
  5. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Okay, 150 is the default MaxClients...

    How many visitors are you getting with what moogle suggested?

    Are you seeing any syntax or other errors in your logs related to httpd?
     
  6. ujr

    ujr Well-Known Member

    Joined:
    Mar 19, 2004
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Also check /var/log/messages for errors at the time httpd dies.

    I have a feeling it may be related to an httpd.conf error, so make sure it's all correct.
     
  7. Manuel_accu

    Manuel_accu Well-Known Member

    Joined:
    Jun 19, 2005
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    delete resources of apache semaphore arrays from memory:

    # ipcs -s | grep apache | perl -e 'while (<STDIN>) { @a=split(/\s+/); print`ipcrm sem $a[1]`}'

    then try to restart your httpd server

    thx,
     
  8. moFBush

    moFBush Well-Known Member

    Joined:
    Dec 31, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    6
    What does that do? In Enligsh?
     
  9. tuxguroo

    tuxguroo Member

    Joined:
    Aug 28, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Manuel, Please tell me what that command do .. in layman's term
     
  10. Manuel_accu

    Manuel_accu Well-Known Member

    Joined:
    Jun 19, 2005
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    Its related to inter process communication, Apache create semaphore array in memory segment, sometimes when you have large number of semaphore array in memory for apache user then it is restarting automatically as new array or cant get the proper memory location to work/ for apache deamon.

    ipcs provides information on the ipc facilities for which the calling process has read acccess.

    However, if you are unsure for using this command you can get the list of semaphore in memory using below mentiond command.

    # ipcs -s
    Here, we see a 8 message queue, all are used by apache users and has permission of 600 rw-rw-rw- "The nsems column os the ipcs command when used with the -s switch indicates the number of semaphores in each semaphore array created in a shared memory segment"


    You can get the maximum nuber of semaphore kernel can have using below mentioned command.

    the last colum "128" is the maximum number of semaphore kernel can have or it will crash.



    The ipcrm command can be used to remove an IPC object from the kernel, for further information about this you can check the tlpd - linux documentation.

    Regards,
     
Loading...

Share This Page