PDA

View Full Version : Server Load High



bigboy
03-29-2009, 06:30 PM
Server Load High. What Ploblem FreeBSD 5.4

Da lastest version

Apache 1.x
php 4 lastest version
Mysql 4


Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp4 0 0 61.xx.xx.xx.80 91.121.120.173.45062 LAST_ACK
tcp4 0 33304 61.xx.xx.xx.80 94.23.8.157.45555 ESTABLISHED
tcp4 0 33257 61.xx.xx.xx.80 91.121.94.48.48223 ESTABLISHED
tcp4 0 0 61.xx.xx.xx.57724 72.29.255.46.9191 SYN_SENT
tcp4 0 31412 61.xx.xx.xx.80 67.195.37.186.55161 FIN_WAIT_1
tcp4 0 20015 61.xx.xx.xx.80 94.23.0.196.58000 ESTABLISHED
tcp4 0 33055 61.xx.xx.xx.80 66.188.145.217.52147 ESTABLISHED
tcp4 0 18585 61.xx.xx.xx.80 94.23.0.40.41690 FIN_WAIT_1
tcp4 0 20164 61.xx.xx.xx.80 94.23.0.196.56003 FIN_WAIT_1
tcp4 0 0 61.xx.xx.xx.80 67.195.37.158.41295 TIME_WAIT
tcp4 0 21583 61.xx.xx.xx.80 94.23.0.40.41514 FIN_WAIT_1
tcp4 0 31509 61.xx.xx.xx.80 94.23.26.49.35084 FIN_WAIT_1
tcp4 0 18657 61.xx.xx.xx.80 94.23.26.49.37070 FIN_WAIT_1
tcp4 0 29460 61.xx.xx.xx.80 94.23.8.157.41567 FIN_WAIT_1
tcp4 0 18657 61.xx.xx.xx.80 91.121.5.71.51499 FIN_WAIT_1
tcp4 0 3357 61.xx.xx.xx.2222 58.10.71.72.51008 FIN_WAIT_1
tcp4 0 78 61.xx.xx.xx.25 94.97.69.204.51159 ESTABLISHED
tcp4 0 0 61.xx.xx.xx.80 91.121.120.173.41686 LAST_ACK
tcp4 0 26546 61.xx.xx.xx.80 94.23.8.157.58637 FIN_WAIT_1
tcp4 0 3144 61.xx.xx.xx.2222 58.10.71.72.47659 FIN_WAIT_1
tcp4 0 21054 61.xx.xx.xx.80 94.23.0.196.43711 FIN_WAIT_1
tcp4 0 33304 61.xx.xx.xx.80 74.6.18.223.44272 FIN_WAIT_1
tcp4 0 21185 61.xx.xx.xx.80 94.23.8.157.56986 FIN_WAIT_1
tcp4 0 29845 61.xx.xx.xx.80 72.94.249.34.50346 FIN_WAIT_1
tcp4 0 1229 61.xx.xx.xx.80 91.121.71.155.34869 FIN_WAIT_1
tcp4 0 0 61.xx.xx.xx.80 91.121.71.155.34792 LAST_ACK
tcp4 0 462 61.xx.xx.xx.80 88.131.106.10.50945 FIN_WAIT_1
tcp4 0 30981 61.xx.xx.xx.80 94.23.8.157.53952 FIN_WAIT_1
tcp4 0 9884 61.xx.xx.xx.2222 58.10.71.72.42966 FIN_WAIT_1
tcp4 0 6730 61.xx.xx.xx.2222 58.10.71.72.40882 FIN_WAIT_1
tcp4 0 0 61.xx.xx.xx.2222 58.10.71.72.35377 TIME_WAIT
tcp4 0 28414 61.xx.xx.xx.80 94.23.8.157.50389 FIN_WAIT_1
tcp4 0 0 61.xx.xx.xx.2222 58.10.71.72.44250 TIME_WAIT
tcp4 0 18494 61.xx.xx.xx.80 94.23.0.40.51933 FIN_WAIT_1
tcp4 0 26502 61.xx.xx.xx.80 94.23.8.157.49820 FIN_WAIT_1
tcp4 0 0 61.xx.xx.xx.80 194.8.75.94.3637 TIME_WAIT
tcp4 0 29108 61.xx.xx.xx.80 94.23.8.157.49258 FIN_WAIT_1
tcp4 0 28575 61.xx.xx.xx.80 91.121.5.71.38591 FIN_WAIT_1
tcp4 0 31856 61.xx.xx.xx.80 94.23.0.196.34956 ESTABLISHED
tcp4 0 20422 61.xx.xx.xx.80 94.23.0.40.51400 FIN_WAIT_1
tcp4 0 32415 61.xx.xx.xx.80 91.121.5.71.36946 FIN_WAIT_1

tillo
03-29-2009, 08:23 PM
It doesn't seem high to me. What exactly is the problem?

bigboy
03-30-2009, 12:54 AM
this My MRTG

tillo
03-30-2009, 03:41 AM
Well, the load average is OK, which means that the system is not "fatigued" by that CPU load.
If the pages are not slowing down, or if you don't notice any other problem, I suggest to follow the general rule "don't fix it if it isn't broken".

If, instead, you notice that something slowed down, check why Apache is taking so much CPU: is it some long running PHP script (check access logs adding response time), is it a DoS (check with tshark and iptraf), did you recently install any PEAR/PECL/Zend module...

I also notice a perl script running as root and eating CPU... is that SpamAssassin? Make sure it eats CPU only when scanning a file, otherwise something is wrong with it too.

bigboy
03-30-2009, 06:19 AM
Yeah

SpamAssassin


cat /var/log/messages



Mar 31 06:05:06 mars named[87124]: client 212.188.20.72#62840: error sending response: not enough free resources
Mar 31 06:05:08 mars named[87124]: client 12.207.232.47#20093: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 64.12.66.48#25398: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 64.12.66.48#14820: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 206.81.192.3#51028: error sending response: not enough free resources
Mar 31 06:05:14 mars named[87124]: client 64.12.66.48#11352: error sending response: not enough free resources
Mar 31 06:05:14 mars named[87124]: client 64.12.66.48#39283: error sending response: not enough free resources
Mar 31 06:05:14 mars named[87124]: client 206.81.192.3#52860: error sending response: not enough free resources
Mar 31 06:05:19 mars named[87124]: client 209.244.4.253#31420: error sending response: not enough free resources
Mar 31 06:05:20 mars named[87124]: client 209.244.4.253#27026: error sending response: not enough free resources
Mar 31 06:05:21 mars named[87124]: client 119.46.240.5#32848: error sending response: not enough free resources
Mar 31 06:05:21 mars named[87124]: client 209.244.4.253#23393: error sending response: not enough free resources
Mar 31 06:05:21 mars named[87124]: client 209.244.4.253#25771: error sending response: not enough free resources
Mar 31 06:05:22 mars named[87124]: client 209.244.4.253#23583: error sending response: not enough free resources
Mar 31 06:05:22 mars named[87124]: client 64.12.66.48#28516: error sending response: not enough free resources
Mar 31 06:05:22 mars named[87124]: client 64.12.66.48#19804: error sending response: not enough free resources
Mar 31 06:05:22 mars named[87124]: client 119.46.240.4#61168: error sending response: not enough free resources
Mar 31 06:05:25 mars named[87124]: client 209.244.4.253#27169: error sending response: not enough free resources
Mar 31 06:05:27 mars named[87124]: client 209.244.4.253#33522: error sending response: not enough free resources
Mar 31 06:05:27 mars named[87124]: client 209.244.4.253#22923: error sending response: not enough free resources
Mar 31 06:05:34 mars named[87124]: client 62.118.91.74#44546: error sending response: not enough free resources
Mar 31 06:05:41 mars named[87124]: client 64.34.195.151#36595: error sending response: not enough free resources
Mar 31 06:05:55 mars named[87124]: client 74.6.17.151#55796: error sending response: not enough free resources
Mar 31 06:06:17 mars named[87124]: client 203.146.237.237#16773: error sending response: not enough free resources
Mar 31 06:06:23 mars named[87124]: client 202.129.27.133#41303: error sending response: not enough free resources
Mar 31 06:06:25 mars named[87124]: client 202.129.27.133#44935: error sending response: not enough free resources
Mar 31 06:06:39 mars named[87124]: client 62.255.64.69#21732: error sending response: not enough free resources

@how@
03-31-2009, 07:14 AM
Try apache 2 with cool confing, i have before small server with apache 1 server load high after apache 2 all work fine and uptime more then 78day.

Wael

Rich-Boy
03-31-2009, 11:06 AM
Yeah

SpamAssassin


cat /var/log/messages



Mar 31 06:05:06 mars named[87124]: client 212.188.20.72#62840: error sending response: not enough free resources
Mar 31 06:05:08 mars named[87124]: client 12.207.232.47#20093: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 64.12.66.48#25398: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 64.12.66.48#14820: error sending response: not enough free resources
Mar 31 06:05:10 mars named[87124]: client 206.81.192.3#51028: error sending response: not enough free resources
...

Run netstat -m to ensure you system isn't running out of mbufs.

Also, i'd recommend enabling Apache's server-status (http://www.cyberciti.biz/faq/apache-server-status/) module to check how http is being accessed.

Finally, if you think that Apache is being attacked you could consider installing mod_evasive, mod_security or a software firewall such as pf.