CARLI / vufind

A library resource discovery portal designed and developed for libraries by libraries
GNU General Public License v2.0
5 stars 0 forks source link

/tmp/vufind_sessions/ not clearing old sessions #132

Closed bgant closed 7 years ago

bgant commented 7 years ago

It looks like session data is accumulating on the servers in the /tmp/vufind_sessions/ directory. This appears to be using up a lot of disk and/or RAM for no reason.

We need a mechanism to clear out old session data on a regular basis or this will cause problems.

cedelis commented 7 years ago

I agree. I recommend adding a crontab entry that routinely checks for session files that are N day(s) old and then remove those,

E.g., remove one-day-old files: find /tmp/vufind_sessions/ -mtime +1 -exec rm {} \;

Perhaps this could be run once an hour (or once a day)?

bgant commented 7 years ago

That looks good. Once an hour would probably be best since this could be a very heavily used server.

cedelis commented 7 years ago

I've added the following crontab entry to vufind3 (and vufind3-devel):

-------- clear out vufind session data

00 * * * * root find /tmp/vufind_sessions/ -mtime +1 -exec rm {} \;