Server load is very high
Hello,CPU: P4 2.8 Ghz
OS: Redhat 9
RAM: 1GB
I need help. My server's load is very high frequently and causing my sites to not responding at all. When it happen, it slow to ssh to the server. Once I got in, top command show:
Load: > 120
Processes: ~350
Memory only ~8k left .. I forgot what the number for buffer and swap is...
ps aux command shows a whole bunch of apache running..
What I did to fix so my sites back online again is
kill -9 ### << ### is mysql id .. when done this .. memory free up to ~700MB
/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start
Then my site is working fine again but I have to do this every time this acting up.
I have about 6 websites running on my server.
Only one of them is large.
Database: ~700MB
Forum: phpBB. I have customized it alot, SEO, etc...
Topics: 59011
Posts: 510951
Users: 38820. Deleted about 20k inactive users two weeks ago
Online (~5 mins): ~250 users online. About ~70 registered logged in and others are just guests
Other websites is small so I dont think it would matter.
Here is some info about my httpd.conf
Timeout 300
KeepAlive On
MaxKeepAliveRequests 30
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 8
MaxSpareServers 13
MaxClients 250
MaxRequestsPerChild 0
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 200
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 400
</IfModule>
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
KeepAlive On
MaxKeepAliveRequests 30
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 8
MaxSpareServers 13
MaxClients 250
MaxRequestsPerChild 0
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 200
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 400
</IfModule>
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
safe-show-database
back_log=75
socket=/var/lib/mysql/mysql.sock
user=mysql
basedir=/var/lib
skip-locking
skip-innodb
max_connections=700
connect_timeout=10
tmp_table_size=64M
key_buffer=16M
myisam_sort_buffer_size=64M
join_buffer_size=1M
sort_buffer_size=2M
read_buffer_size=1M
read_rnd_buffer_size=524288
table_cache=1800
thread_cache_size=384
interactive_timeout=100
max_allowed_packet=64M
max_connect_errors=10
wait_timeout=180
query_cache_limit=1M
query_cache_size=64M
query_cache_type=1
query_prealloc_size=16384
query_alloc_block_size=16384
thread_concurrency=2
[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
innodb_data_file_path=ibdata1:10M:autoextend
datadir=/var/lib/mysql
safe-show-database
back_log=75
socket=/var/lib/mysql/mysql.sock
user=mysql
basedir=/var/lib
skip-locking
skip-innodb
max_connections=700
connect_timeout=10
tmp_table_size=64M
key_buffer=16M
myisam_sort_buffer_size=64M
join_buffer_size=1M
sort_buffer_size=2M
read_buffer_size=1M
read_rnd_buffer_size=524288
table_cache=1800
thread_cache_size=384
interactive_timeout=100
max_allowed_packet=64M
max_connect_errors=10
wait_timeout=180
query_cache_limit=1M
query_cache_size=64M
query_cache_type=1
query_prealloc_size=16384
query_alloc_block_size=16384
thread_concurrency=2
[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
Thanks