1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Automatically delete httpd process IDs?

Discussion in 'Apache' started by wvccboy, Mar 7, 2008.

  1. #1
    I am running a directadmin server that shows me the httpd PIDs. Every 10 minutes or so there are thousands of PIDs listed and it slows down the site a lot.

    By deleting it it helps to cut the load for a while.

    I don't know if deleting the processes is a good thing or not but I'd like to automatically delete them every once in a while if you think it's alright.

    How can I accomplish that?

    Thanks.
     
    wvccboy, Mar 7, 2008 IP
  2. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well cron job to kill the process id's would do it but I think your attacking this from the wrong spot.

    What is causing the spawn?

    You need to do some straces and find out the root of the problem and correct it.

    If it is mysql running wild or possible exploit etc.

    You could also have apache or your web server limit the number of processes allowed.

    Blindly killing processes like that can be very bad especially if it is passing data back and forth on a transaction to a database etc.

    I would also imagine you have tons of stale sessions in tmp logs as well.

    Start looking for the problem.

    Is this a shared host?
     
    LittleJonSupportSite, Mar 7, 2008 IP
    wvccboy likes this.
  3. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #3
    Did a search through and there are no exploits.

    It is a dedicated server.

    I'll look into the number of processes allowed. You think something like 25 is reasonable?

    By the way what logs should I look into?

    Thanks.
     
    wvccboy, Mar 7, 2008 IP
  4. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Depends how busy the server is.

    If oyu have thousands of users then 25 might not cut it and can have negative impact on overall performance.


    Look into :
    /var/log/apache/error.log
    /var/log/system
    /var/log/messages

    File locations might vary a bit depending on distro.

    Also don't take this the wrong way or anything but your a web hosting company and don't know what logs to look at?

    Also was apache pre compiled or was it done from scratch?
     
    LittleJonSupportSite, Mar 7, 2008 IP