Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2008
    Location
    Canada
    Posts
    121

    Very high load - unknown cause

    One of my VPS' spikes to very high load for absolutely no reason. It seems like apache might be the cause, however top doesnt show any process' in particular that are causing the high load ... it just spikes up with absolutely no process' eating the resources.

    If no one is loading a page on the website hosted by the VPS, the load is fine. I can navigate my way through WHM and the load stays down. However if I click on apache status, this takes about 30 seconds to load and the load spikes significantly - however it doesn't stay up and it doesn't go too high. After apache status has loaded, the load goes back to normal. Now, if I were to load a page of the website or even navigate to the website. The load spikes very high and the page takes about a minute to load. Again, if I wait for the page to finish loading the load goes down.

    I have recently rebuilt and recompiled both apache php in hopes that maybe it would fix itself - no dice.

    Any thoughts?

    EDIT:
    I have tried multiple pages, even blank pages. They all take around 30 seconds to load and cause a small spike in load.
    Last edited by andrei155; 04-22-2011 at 04:07 PM.
    No Overselling Guarantee | Now Includes a Free Domain
    █ Shared Hosting Reseller Hosting VPS Hosting
    BLD Hosting - Web Hosting | Web Hosting Blog

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, TX
    Posts
    3,507
    Check the httpd error and access logs for a start, anything there? What does the status page for apache show when it finally loads? What do you see if you type dmesg? Any firewall issues? Dropped packets? I've seen apache act the same way when the firewall tables were full and started dropping packets (doubt this is your specific problem if you're on a VPS though, because it takes a lot of traffic to fill up the tables).
    Dallas Colocation by Incero, 8 years and counting!
    e: sales(at)incero(dot)com 855.217.COLO (2656)
    Colocation & Enterprise Servers, SATA/SAS/SSD, secure IPMI/KVM remote control, 100% U.S.A. Based Staff
    SSAE 16, SAS70, Redundant Power & Network, Fully Diverse Fiber

  3. #3
    Join Date
    Aug 2008
    Location
    Canada
    Posts
    121
    I've turned the firewall off. Dmesg returns nothing. Apache status shows nothing important, a few connections. Error log doesn't seem useful either.

    error log:
    Code:
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] Could not write to logfile:, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] Printing message to stderr:, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] [Fri Apr 22 13:28:54 2011] [info] Executing "/home/gcloan/public_html/support/visitor/index.php" as UID 504, GID 501, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] , referer: http://www.gcloan.com/index.htm
    I don't see how apache isn't able to handle one page request.
    No Overselling Guarantee | Now Includes a Free Domain
    █ Shared Hosting Reseller Hosting VPS Hosting
    BLD Hosting - Web Hosting | Web Hosting Blog

  4. #4
    Join Date
    Jan 2008
    Location
    India
    Posts
    287

  5. #5
    Join Date
    Aug 2004
    Location
    Dallas, TX
    Posts
    3,507
    Quote Originally Posted by andrei155 View Post
    I've turned the firewall off. Dmesg returns nothing. Apache status shows nothing important, a few connections. Error log doesn't seem useful either.

    error log:
    Code:
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] Could not write to logfile:, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] Printing message to stderr:, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] [Fri Apr 22 13:28:54 2011] [info] Executing "/home/gcloan/public_html/support/visitor/index.php" as UID 504, GID 501, referer: http://www.gcloan.com/index.htm
    [Fri Apr 22 13:29:06 2011] [error] [client 174.95.47.65] , referer: http://www.gcloan.com/index.htm
    I don't see how apache isn't able to handle one page request.
    Is your log directory full? Any partitions full on the system?
    Dallas Colocation by Incero, 8 years and counting!
    e: sales(at)incero(dot)com 855.217.COLO (2656)
    Colocation & Enterprise Servers, SATA/SAS/SSD, secure IPMI/KVM remote control, 100% U.S.A. Based Staff
    SSAE 16, SAS70, Redundant Power & Network, Fully Diverse Fiber

  6. #6
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    You're probably dealing with a 32-bit limitation. Run this one liner as root and see if it helps:

    Code:
    ls -1 /etc/httpd/logs/|grep log$|while read f; do mv /etc/httpd/logs/${f} /etc/httpd/logs/${f}.orig; /etc/init.d/httpd stop; sleep 3; /etc/init.d/httpd start; done
    Regards
    Joe / UNIXY
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  7. #7
    Join Date
    Aug 2008
    Location
    Canada
    Posts
    121
    Quote Originally Posted by UNIXy View Post
    You're probably dealing with a 32-bit limitation. Run this one liner as root and see if it helps:

    Code:
    ls -1 /etc/httpd/logs/|grep log$|while read f; do mv /etc/httpd/logs/${f} /etc/httpd/logs/${f}.orig; /etc/init.d/httpd stop; sleep 3; /etc/init.d/httpd start; done
    Regards
    Joe / UNIXY
    This solved absolutely everything! Do you mind explaining a little more... I'm baffled.
    No Overselling Guarantee | Now Includes a Free Domain
    █ Shared Hosting Reseller Hosting VPS Hosting
    BLD Hosting - Web Hosting | Web Hosting Blog

  8. #8
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,955
    Quote Originally Posted by andrei155 View Post
    This solved absolutely everything! Do you mind explaining a little more... I'm baffled.
    Each time someone visits websites on your server, Apache needs to open one or more log files. It just happened that one of your log files grew so large that Apache was unable to open it and in a way put the apache worker in limbo/stalled state. Opening files is a bit complex and involves "mapping" the file into virtual memory (address space). Address space is very limited on 32-bit machines. This wouldn't happen on 64-bit (I always recommend 64-bit OS to my clients even when they only need 512MB memory allocations).

    The technical details are very involved. But you can avoid this by running logrotate against /etc/httpd/logs so it doesn't happen again.

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  9. #9
    Very good explanation. It really helps.

Similar Threads

  1. Strange lines in auth.log - login by UNKNOWN on UNKNOWN
    By Yanek in forum Hosting Security and Technology
    Replies: 1
    Last Post: 03-05-2011, 06:51 AM
  2. unknown space consumption - very high no idea how !!!!!!!
    By koolnhot in forum Hosting Security and Technology
    Replies: 6
    Last Post: 07-31-2009, 07:33 AM
  3. high server load / high swap / lots of httpd
    By hbhb in forum Hosting Security and Technology
    Replies: 12
    Last Post: 02-22-2008, 09:17 AM
  4. Optimize : High Load , Slow Websites , High Memory Using .
    By ^LinuX^ServeR^ in forum Dedicated Server
    Replies: 50
    Last Post: 06-19-2006, 12:25 PM
  5. Server load not very high but pages load slowly
    By singtel22 in forum Hosting Security and Technology
    Replies: 17
    Last Post: 01-27-2005, 02:43 PM

Posting Permissions

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