HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Apache2 high load (http://www.howtoforge.com/forums/showthread.php?t=55367)

lano 12th December 2011 20:31

Apache2 high load
 
For a week or so, I have high load (2.5-3.0 and higher) by some Apache2 processes.

top:
Code:

top - 20:18:52 up 216 days, 21:59,  2 users,  load average: 2.17, 2.14, 2.22
Tasks: 143 total,  2 running, 141 sleeping,  0 stopped,  0 zombie
Cpu(s): 41.7%us, 10.1%sy,  0.0%ni, 43.0%id,  5.1%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:  3501248k total,  3262216k used,  239032k free,    71156k buffers
Swap:  3879608k total,    6556k used,  3873052k free,  1763000k cached

Top also says, that problem is in apache 2 processes:

Code:

25118 www-data  20  0 57804  30m 5344 S  62  0.9  0:06.02 apache2
24741 www-data  20  0 65432  35m 5888 R  17  1.1  0:16.92 apache2

Now, lsof -p 25118 says:

Code:

apache2 25118 www-data  39w  REG 
apache2 25118 www-data  115w  REG        9,0    9496  11617510 /var/log/ispconfig/httpd/different_site.tld/error.log
apache2 25118 www-data  116w  REG        9,0        0  11174773 /var/log/ispconfig/httpd/different_site.tld/error.log
apache2 25118 www-data  117w  REG        9,0    67835  13705429 /var/log/ispconfig/httpd/different_site.tld/error.log
apache2 25118 www-data  118w  REG        9,0    1132  11985162 /var/log/ispconfig/httpd/different_site.tld/error.log
apache2 25118 www-data  119w  REG        9,0    2105  11953680 /var/log/ispconfig/httpd/different_site.tld/error.log
apache2 25118 www-data  120w  REG   
apache2 25118 www-data  158u  0000        0,7        0        13 anon_inode
apache2 25118 www-data  159w  FIFO        0,6          311222313 pipe
apache2 25118 www-data  160w  REG        9,0  390207  10831840 /var/log/apache2/access.log
apache2 25118 www-data  161w  REG        9,0        0  10829864 /var/run/apache2/ssl_mutex (deleted)
apache2 25118 www-data  162r  FIFO        0,6          311222319 pipe
apache2 25118 www-data  163w  FIFO        0,6          311222319 pipe
apache2 25118 www-data  164w  FIFO        0,6          311222315 pipe
apache2 25118 www-data  165r  FIFO        0,6          311222320 pipe
apache2 25118 www-data  166w  FIFO        0,6          311222316 pipe
apache2 25118 www-data  167w  FIFO        0,6          311222320 pipe

Note: different_site is actualy real website.
As far as I can see, reason for load is apache2 writing custom error logs.
Now, I need your suggestion, how to fix this?
Disable apache2 error logging? Or am I interpreting readings totaly wrong?
I'm running Etch with ISPC3.

Any comment, advice is appritiated.

pititis 12th December 2011 22:45

Hi,

The question here is...what's in this error.log file? Try to check it, maybe you get many errors there for a reason.

But don't alarm you, this load average is small.

Cheers

manojsamtani 20th December 2011 11:53

please check/post your log file size and logs??

--
Manoj
apache-error.blogspot.com

eyeoncomputers 24th December 2011 17:29

I have seen a strange behavior before where my apache server would actually crash after a lot of traffic. I finally figured out the keepalive sessions were lingering along and ultimately accumulating. you may be able to tweak the keepalive, and number of process parameters for them to be killed off more quickly. This may be an off shot, but also worth a shot.


All times are GMT +2. The time now is 00:08.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.