Results 1 to 10 of 10
  1. #1

    httpd Processes sticking around.

    I've been having a problem for the past few days where a few httpd process will just start and stick around using a ton of CPU. The only way to make them go away is to restart apache and kill the individual processes.

    I have seen it as high as 5 of these doing this at once. They are running about 90 - 100% CPU usage and causing the sever load to increase.

    I have never seen this, I did not change anything with my apace config so I don't understand why all of a sudden I am having this problem

    I have attached a screen shot of top. Does anyone have any idea's on things to try to figure out what is causing this?

    Thanks
    Attached Thumbnails Attached Thumbnails Screen shot 2009-09-24 at 8.21.10 PM.png  
    SpeedSmart.net - The ultimate HTML5 internet speed test & App

  2. #2
    Join Date
    Oct 2008
    Location
    Chicago, IL
    Posts
    222
    When you kill apache, do you have to kill these high load processes separately?

    Almost as if they're not associated with apache? Or am I reading too much into this?

    How soon after you kill apache do they start running high loads on the cpu?

    What is the StartServers directive in httpd.conf set to? How many websites on this server?

    Sorry for all the questions. Just trying to help.

  3. #3
    Join Date
    May 2009
    Location
    On a Speck!!!!!
    Posts
    216
    Is the Apache compiled as Prefork module or worker module?

  4. #4
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,771
    Did you check the apache status page to see if any particular site is having more connections? Also have a check of the server for ddos attack.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  5. #5
    Join Date
    Jul 2009
    Posts
    178
    strace -p pid where pid is of the http process consuming max cpu.

    You can find the domain which is consuming max resources.

  6. #6
    Quote Originally Posted by WeWatch View Post
    When you kill apache, do you have to kill these high load processes separately?

    Almost as if they're not associated with apache? Or am I reading too much into this?

    How soon after you kill apache do they start running high loads on the cpu?

    What is the StartServers directive in httpd.conf set to? How many websites on this server?

    Sorry for all the questions. Just trying to help.

    I can kill each httpd process that is doing this separately or I can kill them all by restarting apache.

    Most of the time its about an hour or so before 1 comes back again. But overnight I will come back and have several.

    My httpd looks like this

    KeepAlive On
    MaxKeepAliveRequests 1000
    KeepAliveTimeout 20
    HostnameLookups off
    ErrorLog "logs/error_log"
    DefaultType text/plain
    AddType text/html .shtml

    <IfModule prefork.c>
    StartServers 4
    MinSpareServers 2
    MaxSpareServers 4
    ServerLimit 2050
    MaxClients 1500
    MaxRequestsPerChild 10
    </IfModule>



    Quote Originally Posted by Thomas Manning View Post
    Is the Apache compiled as Prefork module or worker module?
    Its prefork

    Quote Originally Posted by david510 View Post
    Did you check the apache status page to see if any particular site is having more connections? Also have a check of the server for ddos attack.
    There is only one site running on this server and from checking around there isn't a abnormally higher number of connections, or usage of something. Everything is the way its suppose to be except this.
    SpeedSmart.net - The ultimate HTML5 internet speed test & App

  7. #7
    Join Date
    Feb 2005
    Location
    India
    Posts
    1,073
    What script is running. Did you check cpu usage option of WHM (assuming your running whm/cpanel), to see what process/script/path is causing the load. I have a feeling its an insecure or buggy script (forum or live support system)?

  8. #8
    Quote Originally Posted by eth10 View Post
    strace -p pid where pid is of the http process consuming max cpu.

    You can find the domain which is consuming max resources.
    Quote Originally Posted by RDOSTI View Post
    What script is running. Did you check cpu usage option of WHM (assuming your running whm/cpanel), to see what process/script/path is causing the load. I have a feeling its an insecure or buggy script (forum or live support system)?
    Using both of those I think that I may have found the problem.

    I run a custom script for my file hosting site, and when a file is uploaded there is some stuff done to it and its put in a special location on the server outside the public_html dir to keep things safe.

    But there was one dir with like 10 files missing and anytime someone requested a one of those files, The php script that I use to get and do all the special things to the file so a user can download it, was going nuts looking for the file 100,000's of times.

    stat64("*********/ufiles/997/0/997/47937bd9c80cd9.70867069", 0xbfc0d3a0) = -1 ENOENT (No such file or directory)

    Hopefully this is it, I've had too many sleepless nights trying to figure this out.

    Thanks to everyone who helped.
    SpeedSmart.net - The ultimate HTML5 internet speed test & App

  9. #9
    Join Date
    Apr 2004
    Location
    UK
    Posts
    1,334
    Correct me if I am wrong, but by default httpd keeps a pool of processes (a worker pool) open to save on launch latency. Work is then farmed out to these processes.
    .
    » Kayako customer service software and live chat software- your customers deserve better than helpdesk

  10. #10
    Quote Originally Posted by Jamie Edwards View Post
    Correct me if I am wrong, but by default httpd keeps a pool of processes (a worker pool) open to save on launch latency. Work is then farmed out to these processes.
    It does, I believe its startservers that controls that, but they are not suppose to use as much CPU as the ones I had.
    SpeedSmart.net - The ultimate HTML5 internet speed test & App

Similar Threads

  1. httpd processes running top or ps?
    By joeshacks in forum Hosting Security and Technology
    Replies: 2
    Last Post: 02-05-2008, 04:12 AM
  2. Why so many Httpd processes?
    By the_go_453 in forum VPS Hosting
    Replies: 3
    Last Post: 04-19-2007, 12:47 AM
  3. 5 Httpd processes?
    By runes911 in forum Hosting Security and Technology
    Replies: 9
    Last Post: 04-13-2005, 05:10 PM
  4. httpd processes out of hand?
    By JSH-John in forum Hosting Security and Technology
    Replies: 7
    Last Post: 02-01-2004, 10:56 AM
  5. httpd processes
    By phuture in forum Dedicated Server
    Replies: 1
    Last Post: 02-03-2002, 02:01 AM

Posting Permissions

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