I've noticed my VPS behaving weird today. I have set it up as a web server (along with MySQL, PHP, FTP etc) and at the moment there is only one website running on there. I noticed earlier today that the website would loose connection to the database intermittently, and would also fail to load at all.
I opened Webmin and when it eventually loaded (it took a while) it reported back that the CPU usuage for I/O was 100%, and that 125.39MB of the 125.47MB Virtual RAM was used up. I reset the VPS and after it came back online, the CPU read that it was running at 100% Idle and that 0KB of RAM was being used.
After 1 hour 44 minutes, the server now says that I'm using 7.36MB of RAM. It also says that I have 66 processes running, and on looking at that I have 9 instances of httpd service running.
I'm thinking that the httpd services are eating up the RAM and CPU (each instance is reporting that it's using roughly 330000KB of RAM). As I only have one website running on the server (and one instance of Webmin) shouldn't I expect to see only one instance of httpd running? Or is this normal?
If the multiple instances of httpd aren't the problem, what else could be causing these issues?
EDIT:
The processes listed by CPU usage are:
ID Owner CPU Command
2401 root 1.3 % /usr/libexec/webmin/proc/index_cpu.cgi<br />
1 root 0.0 % /sbin/init<br />
2 root 0.0 % [kthreadd]<br />
3 root 0.0 % [migration/0]<br />
4 root 0.0 % [ksoftirqd/0]<br />
5 root 0.0 % [watchdog/0]<br />
6 root 0.0 % [events/0]<br />
7 root 0.0 % [cpuset]<br />
8 root 0.0 % [khelper]<br />
9 root 0.0 % [netns]<br />
10 root 0.0 % [async/mgr]<br />
The processes by RAM are:
1034 mysql 444648 kB /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-e ...<br />
1156 apache 334512 kB /usr/sbin/httpd<br />
1157 apache 333728 kB /usr/sbin/httpd<br />
1161 apache 333728 kB /usr/sbin/httpd<br />
1136 root 319352 kB /usr/sbin/httpd<br />
1158 apache 319352 kB /usr/sbin/httpd<br />
1159 apache 319352 kB /usr/sbin/httpd<br />
1160 apache 319352 kB /usr/sbin/httpd<br />
1162 apache 319352 kB /usr/sbin/httpd<br />
1163 apache 319352 kB /usr/sbin/httpd<br />
882 root 248576 kB /sbin/rsyslogd -c 4<br />
1144 root 117072 kB crond<br />
1960 root 108212 kB -bash<br />
945 root 108076 kB /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/my ...<br />
1957 root 97456 kB sshd: root@pts/0<br />
2486 root 67068 kB /usr/libexec/webmin/proc/index_size.cgi<br />
1164 root 64152 kB /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf<br />
2489 root 64152 kB /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf<br />
909 root 63756 kB /usr/sbin/sshd<br />
1135 postfix 62220 kB qmgr -l -t fifo -u<br />
2062 postfix 62048 kB pickup -l -t fifo -u<br />
1126 root 61968 kB /usr/libexec/postfix/master<br />
1 root 19112 kB /sbin/init<br />
2498 root 11208 kB sh -c ps --cols 2048 -eo user:80,ruser:80,group:80,rgroup:80,pid,ppid,pgid,pcpu, ...<br />
2499 root 11092 kB ps --cols 2048 -eo user:80,ruser:80,group:80,rgroup:80,pid,ppid,pgid,pcpu,vsz,ni ...<br />
358 root 10860 kB /sbin/udevd -d<br />
615 root 10856 kB /sbin/udevd -d<br />
894 root 3988 kB /usr/sbin/acpid<br />
1172 root 3984 kB /sbin/agetty /dev/ttyS0 9600 vt100-nav<br />
top
, sort by CPU% and see what the busiest processes are?/usr/libexec/webmin/proc/index_cpu.cgi
at 4.0%. But thats it, none of the other processes have any CPU usage?free -m
?