So my lighttpd was running fine for more than a year. Two days ago I decided to install Wordpress 3.0.1 (PHP was already in use by other tools).
So after some hours of very few hits (i might get 10 unique visitors per day at max), the system almost hangs with a load of 25-35, lighttpd eating all CPU and RAM (see top
at the end of the post).
I read of similar problems, but none seemed to be exactly what occurs here. The "solutions" on the web were like installing a Wordpress Caching Plugin, which i did (W3 Total Cache). As the problem didn't occur during the night, I thought that was the problem. But right now the machine is totally overloaded, even OOM Killer is kicking in.
A lighttpd restart helps, but that's not a real solution.
System specs:
- Intel Celeron2Duo 2.2GHz
- 4GB RAM
- Debian Lenny 5.0.6
- Kernel: 2.6.26-2-amd64
- lighttpd 1.4.19
- MySQL 5.0.51a
- PHP 5.2.6-1+lenny
Changing the hardware is no option, as it's a home server made for low power consumption. Ideas? Thanks in advance.
top - 10:34:04 up 19:03, 1 user, load average: 25.98, 22.97, 12.51
Tasks: 155 total, 15 running, 140 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.5%us, 95.6%sy, 0.0%ni, 0.0%id, 3.6%wa, 0.0%hi, 0.3%si, 0.0%st
Mem: 4062488k total, 4039436k used, 23052k free, 264k buffers
Swap: 979956k total, 979956k used, 0k free, 3012k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3648 debian-t 20 0 136m 6972 116 R 7 0.2 30:48.27 transmission-da
2569 root 20 0 196m 900 108 S 5 0.0 4:51.94 rsyslogd
316 munin 20 0 30592 548 136 D 4 0.0 0:04.68 sendmail
3377 root 20 0 66292 6864 208 D 4 0.2 2:01.44 python
3188 www-data 20 0 4074m 3.1g 124 R 4 81.2 12:20.23 lighttpd
Edit: I installed a temporary restart script as suggested by LatinSuD. So probably tomorrow I can tell details about the interval of that issue.