tmp folder building up 100s of sess files every few minutes

delfinparis

Member
Jun 16, 2011
21
0
51
This just started happening yesterday - I noticed on my Wordpress site that there was, at the bottom of each page, an error wanting to "open(tmp/sess_xxxxx"

I went into my tmp folder via root and found 932 sess files. I deleted them but they're coming at about a few hundred every five minutes.

I'm sure it has something to do with a Wordpress plugin, but I can't figure out which one.

Is there anything I can do to figure out what is causing the session files? Or at the very least can someone walk me through a cron command to auto-delete these every 30 min or so? Ideally I'd like to get rid of them altogether, obviously. :)

I really appreciate any and all help. Thanks!
 

delfinparis

Member
Jun 16, 2011
21
0
51
I was able to add this crontab which runs every 5 min to find sessions that have been open longer than 60min (I think - ha).

Code:
*/5 * * * * find /tmp -type f -name sess_* -cmin +60 |xargs rm -f
But I'd still like to figure out what the heck is causing these session errors.