filth

Active Member
Jun 18, 2004
28
0
151
Hi

I have been having a problem for a while with long running processes and I cannot seem to find the cause.

The processes in question are mySQL and apache.

Top shows me the following (I have ordered them by time):-

Tasks: 128 total, 1 running, 127 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.0% us, 1.0% sy, 0.0% ni, 95.7% id, 0.7% wa, 0.0% hi, 1.7% si
Mem: 772420k total, 750840k used, 21580k free, 21112k buffers
Swap: 1052216k total, 251040k used, 801176k free, 113056k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3062 mysql 16 0 95316 10m 2540 S 0.0 1.4 6:30.50 mysqld
19065 nobody 16 0 38632 22m 3916 S 0.0 3.0 2:01.45 httpd
2961 nobody 16 0 44296 24m 4256 S 0.0 3.3 1:55.59 httpd
19173 nobody 16 0 32704 16m 3876 S 0.0 2.2 1:52.93 httpd
19066 nobody 15 0 32416 17m 4020 S 0.0 2.3 1:40.59 httpd
2963 nobody 16 0 38320 21m 4176 S 0.0 2.8 1:24.67 httpd
2959 nobody 15 0 40668 24m 4156 S 0.0 3.3 1:21.63 httpd
2968 nobody 16 0 37472 22m 4160 S 0.0 2.9 1:21.47 httpd
9064 nobody 15 0 43800 27m 4256 S 0.0 3.6 1:20.87 httpd
2967 nobody 15 0 38824 23m 4112 S 0.0 3.1 1:16.90 httpd
2956 nobody 16 0 41452 25m 4256 S 0.0 3.4 1:16.36 httpd
3498 nobody 15 0 39408 23m 4260 S 0.0 3.1 1:14.88 httpd
2957 nobody 15 0 37204 22m 4116 S 0.0 3.0 1:14.38 httpd
2964 nobody 16 0 41960 26m 4160 S 0.0 3.5 1:13.89 httpd
2966 nobody 16 0 40760 25m 4196 S 0.0 3.3 1:13.28 httpd
2958 nobody 15 0 35888 20m 4152 S 0.0 2.8 1:10.75 httpd
2960 nobody 16 0 36336 20m 4140 S 0.0 2.8 1:10.43 httpd
2965 nobody 15 0 35024 20m 4096 S 0.0 2.7 1:08.75 httpd
8870 nobody 16 0 37584 22m 4256 S 0.0 3.0 1:04.93 httpd
3626 root 16 0 31804 25m 2232 S 0.0 3.4 0:54.41 spamd
3443 root 34 19 10500 6652 1988 S 0.0 0.9 0:51.17 cpanellogd
7396 root 16 0 31980 25m 2228 S 0.0 3.4 0:45.38 spamd
19070 nobody 15 0 33968 18m 3948 S 0.0 2.5 0:44.08 httpd
19170 nobody 16 0 35136 20m 4064 S 0.0 2.7 0:43.74 httpd
19169 nobody 15 0 38124 22m 3916 S 0.0 3.0 0:42.99 httpd
19067 nobody 15 0 42768 26m 4404 S 0.0 3.5 0:39.51 httpd
19171 nobody 16 0 38040 21m 3904 S 0.0 2.9 0:38.86 httpd
19068 nobody 16 0 32444 17m 4136 S 0.0 2.3 0:38.82 httpd
19168 nobody 15 0 39124 23m 4012 S 0.0 3.1 0:36.70 httpd
19069 nobody 15 0 36900 21m 4120 S 0.0 2.8 0:35.11 httpd
19172 nobody 15 0 33984 18m 3912 S 0.0 2.4 0:29.85 httpd
2931 root 15 0 10292 3928 1492 S 0.0 0.5 0:29.68 lfd
19174 nobody 15 0 32652 17m 4020 S 0.0 2.4 0:28.14 httpd
19071 nobody 16 0 33708 19m 4100 S 0.0 2.5 0:27.24 httpd
2340 named 17 0 31952 4220 1792 S 0.0 0.5 0:22.99 named
205 root 15 0 0 0 0 S 0.0 0.0 0:11.05 kswapd0
8743 root 16 0 5988 2248 1400 S 0.0 0.3 0:06.93 authProg
[~]#
As you can see the load is not exactly high but there are quite a few http connections active for a prolonged length of time. The mysql process has been active for 6.5 hours. I have seen this go well over 36 hours before in the past yet (as you can see further down this post) there are no connections that have been connected for that long.
 

filth

Active Member
Jun 18, 2004
28
0
151
netstat -alntp

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 5901/couriertcpd
tcp 0 0 0.0.0.0:1 0.0.0.0:* LISTEN 3520/portsentry
tcp 0 0 0.0.0.0:2082 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 0.0.0.0:2083 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 5919/couriertcpd
tcp 0 0 0.0.0.0:2084 0.0.0.0:* LISTEN 3457/entropychat
tcp 0 0 0.0.0.0:2086 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 0.0.0.0:2087 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 3062/mysqld
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 5911/couriertcpd
tcp 0 0 0.0.0.0:2095 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 127.0.0.1:783 0.0.0.0:* LISTEN 7392/spamd.pid --ma
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 5894/couriertcpd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 3520/portsentry
tcp 0 0 0.0.0.0:2096 0.0.0.0:* LISTEN 5603/cpsrvd - waiti
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2949/httpd
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 7374/exim
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 3112/pure-ftpd (SER
tcp 0 0 66.197.187.30:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.29:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.27:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.26:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.25:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.24:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.23:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.22:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 64.191.71.89:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 64.191.71.88:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 64.191.71.87:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 64.191.71.86:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 64.191.71.85:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 66.197.187.21:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2340/named
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2351/sshd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 7369/exim
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2340/named
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 2949/httpd
tcp 0 0 0.0.0.0:2077 0.0.0.0:* LISTEN 3435/cpdavd - accep
tcp 0 0 0.0.0.0:2078 0.0.0.0:* LISTEN 3435/cpdavd - accep
tcp 1 0 66.197.187.21:39718 72.34.230.108:80 CLOSE_WAIT 19070/httpd
tcp 0 0 66.197.187.21:143 194.215.74.60:61123 ESTABLISHED 20170/imapd
tcp 0 0 66.197.187.21:80 66.249.66.44:35816 ESTABLISHED 19171/httpd
tcp 0 0 66.197.187.21:143 194.215.74.60:61115 ESTABLISHED 20280/imapd
tcp 0 0 66.197.187.21:40050 213.251.133.117:80 ESTABLISHED 2963/httpd
tcp 0 0 66.197.187.21:80 62.193.249.81:40897 TIME_WAIT -
tcp 1 0 66.197.187.21:39272 219.117.210.243:80 CLOSE_WAIT 19172/httpd
tcp 1 0 66.197.187.21:39360 219.117.210.243:80 CLOSE_WAIT 19173/httpd
tcp 1 0 66.197.187.21:40237 219.117.210.243:80 CLOSE_WAIT 3498/httpd
tcp 0 0 66.197.187.25:25 84.223.161.110:4417 TIME_WAIT -
tcp 0 7056 66.197.187.25:22 84.13.111.20:2939 ESTABLISHED 19531/1
tcp 1 0 66.197.187.21:39993 216.17.110.97:80 CLOSE_WAIT 2957/httpd
watch mysqladmin proc
-
-------+
| Id | User | Host | db | Command | Time | State | Info
|
+------+-----------+-----------+-----------+---------+------+-------+-----------
-------+
| 3 | eximstats | localhost | eximstats | Sleep | 168 | |
|
| 9837 | root | localhost | | Query | 0 | | show proce
sslist |
+------+-----------+-----------+-----------+---------+------+-------+-----------
-------+
Has anyone got any suggestions what may be causing this?

I have tried posting the content of a ps -auxf command as well but 1 minute vbulletin claims the post is shorter than 10 characters then it claims it is too long.
 
Last edited:

brooktdf

Member
Oct 31, 2007
8
0
51
in the sky
well this httpd prcocesses can be of anything. You should gather some more info, possibly with a firewall
ps. yea these forums control us :rolleyes: