I'm not a server admin, but grudgingly learned the basics when managed hosting turned out to be a disaster. "If you want it done right, do it yourself." So I built up my own 1GB Debian server at Slicehost, running LAMP stack for a busy Wordpress and phpBB site.
It's gone down about once a week in the 7 months I've had it. I visited this forum and anything on the Web for hints at good my.cnf and apache2.conf configuration practices, and implemented what I found.
_I installed and watch Munin
_I installed and watch mysqltuner.pl
For a time it was stable, but the crashes are back, and more frequent.
Munin's charts from today's two crashes [prssr.com]. I can see what Munin's telling me, but I can't understand why. Is it occasional DOS attacks? This morning's crash was at 3:30 when traffic is light.
Are mysql queries bringing it down? Apache running out of memory? I don't know the answers.
From apache2.conf
Timeout 12
KeepAlive Off
MaxKeepAliveRequests 25
KeepAliveTimeout 2
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 3
MaxSpareServers 6
MaxClients 171
MaxRequestsPerChild 100
</IfModule>
<IfModule mpm_worker_module>
StartServers 2
MaxClients 99
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
HostnameLookups Off
From my.cnf (abbreviated):
key_buffer= 48M
max_allowed_packet= 16M
thread_stack= 64K
thread_cache_size= 64
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover= BACKUP
max_connections = 400
table_cache = 1024
tmp_table_size = 64M
max_heap_table_size= 64M
query_cache_limit = 256k
query_cache_size = 64M
I'm really trying to understand this, but I'm hitting the law of diminishing returns. Insight would be a livesaver. Thank you.