busy server problems

Im getting lots of backed up sql connections on a busy server, in trying to work out what is causing the issue, it seems related to when in htop I see commands like :

find /var/lib/php5/ -type f -cmin +1440 -print0

CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm)

The second example is ‘similar’ but not excately the same as the one I had seen as it is intermittent and comes, the server has a wobble then goes. When doing a strace -p on the resource id it we extreemly busy until it self terminated.

I will post again when I have more data but any idea what these types of processes relate too?

on strace -p here is the some of the output of the :

stat64(“sess_63d55129d3356f8e6812f5459cc7f9”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_4b1bf5404a3f902693adf472d84013”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_484ebd4e1a7c7df6fd743cc34b0e47”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_2a87b82e1ae33a40f6db572d85a4ec”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_b69172bd2c3d9263627fb18e443b70”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_8b87eeae93222f28571cfab1eba74a”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0
lstat64(“sess_ecb2b560a51c2a7d3dc8e1a2bdd6”, {st_mode=S_IFREG|0600, st_size=0, …}) = 0

+++ lots more like it.

Howdy,

Some distributions have a cron job in “/etc/cron.d/php5” that clears out certain PHP files, what you have above seems to resemble what that cron job is doing.

I have a suspicion that if you’re seeing a backlog of those processes, that it’s a symptom rather than the actual problem… however, you could certain tweak the cron job, and set it to run less frequently.

-Eric