I have server with CentOS 6.2, apache 2.2, php 5.3, mysql 5.1. Server is installed in KVM container.
From time to time apache stalls. It just stops accepting connections. Looks like it reaches ServerLimit
and keep accepted connections opened.
The strange thing in my opinion is that after service httpd restart
server goes down again very fast. It accepts connections only for 1-2 seconds may be. And stalls again. But after reboot it can work several hours without problems. Or can stall again in several minutes. But it is not seconds like after service httpd restart
.
Another noticeable thing is that after server stalled, I'm not able to connect to it via ssh. But if I already was connected, I can type commands.. but, if I type i.e. service httpd restart
system performs my command very slow (but CPU is free and memory is rather free). So, it looks like server cant allocate some resource and waits for it. But I'm not sure what exactly it waits for..
there are variables from sysctl -a
, which were changing during server working
servername/vars/
Server settings
ServerLimit 140
MaxClients 128
MinSpareServers 5
MaxSpareServer 10
MaxRequestsPerChild 4000
KeepAlive On
KeepAliveTimeout 2
MaxKeepAliveRequests 10
Setting keepAlive to off didnt help
update
I think i know what is wrong. Looks like host's SELinux by some reasons randomly blocks kvm-guest's writing to disk. May be it is because i didnt use the libvirt pool, but just lvm-volumes to add disks devices to guest. now I need only wait while it will happen again and check logs to be sure.
update 2
NO, it is not SELinux. Question is still opened. Any ideas?