CPU[|||| 3.3%] Tasks: 71, 155 thr; 1 running
Mem[|||||||||||||||||||||||||||||||||||||||||||||||||1261/1875MB] Load average: 0.00 0.02 0.01
Swp[ 0/0MB] Uptime: 02:17:35
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
2385 centos 20 0 110M 2136 1228 R 14.3 0.1 0:00.01 htop
1 root 20 0 19232 1532 1240 S 0.0 0.1 0:01.77 /sbin/init
372 root 16 -4 10764 888 348 S 0.0 0.0 0:00.05 /sbin/udevd -d
584 root 18 -2 10628 756 348 S 0.0 0.0 0:00.00 /sbin/udevd -d
937 root 20 0 9116 1004 512 S 0.0 0.1 0:00.00 /sbin/dhclient -H staging -1 -q -cf /etc/dhcp/dhclient-eth0.conf -lf /var/lib/
994 root 16 -4 29764 840 596 S 0.0 0.0 0:00.00 auditd
993 root 16 -4 29764 840 596 S 0.0 0.0 0:00.03 auditd
1016 root 20 0 243M 1652 1068 S 0.0 0.1 0:00.00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
1018 root 20 0 243M 1652 1068 S 0.0 0.1 0:00.00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
1019 root 20 0 243M 1652 1068 S 0.0 0.1 0:00.00 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
1015 root 20 0 243M 1652 1068 S 0.0 0.1 0:00.02 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
1042 redis 20 0 136M 5384 1040 S 0.0 0.3 0:00.00 /usr/bin/redis-server 127.0.0.1:6379
1043 redis 20 0 136M 5384 1040 S 0.0 0.3 0:00.00 /usr/bin/redis-server 127.0.0.1:6379
1038 redis 20 0 136M 5384 1040 S 0.0 0.3 0:07.41 /usr/bin/redis-server 127.0.0.1:6379
1052 dbus 20 0 21432 884 636 S 0.0 0.0 0:00.00 dbus-daemon --system
1090 root 20 0 4076 640 528 S 0.0 0.0 0:00.00 /usr/sbin/acpid
1226 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.00 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1227 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.00 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1228 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.00 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1229 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.00 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1230 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.00 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1223 memcached 20 0 323M 880 528 S 0.0 0.0 0:00.22 memcached -d -p 11211 -u memcached -m 256 -c 1024 -P /var/run/memcached/memcac
1245 root 20 0 66288 1200 468 S 0.0 0.1 0:00.00 /usr/sbin/sshd
1256 ntp 20 0 30740 2148 1536 S 0.0 0.1 0:00.03 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
1286 root 20 0 105M 1672 1340 S 0.0 0.1 0:00.00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysq
1378 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1379 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1382 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.22 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1383 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.20 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1384 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.16 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1385 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.17 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
1386 mysql 20 0 9.6G 871M 14300 S 0.0 46.5 0:00.28 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib
Apache is crashing because of high memory usage, but I am not 100% sure, because there's still some memory left and it's not using 100% of the RAM. However, it's using a lot of virtual memory for some reason, which tells me there might be a lack of RAM. How do you get to the root cause of what's calling the MYSQL process? I need to find the exact php line that's responsible of the large amount of memory being spent. Also, is there a way to make sure that it's the MYSQL process that's causing Apache to shut down at some point? How do you take a process, and then trace back to the exact code that's causing this?