Page 1 of 1

Are Session files routinely cleaned out?

Posted: Tue Apr 15, 2014 2:10 pm
by beeman
I've been running my server smoothly for more than half a year now but recently I had a problem with inodes maxing out in the /tmp directory. I noticed there were 100,000s of session files from my opencart website and they were not being deleted.

I noticed /var/tmp and /tmp contain the exact same session files as well. The only changes I've made on this server was installing csf, could csf be the cause of this problem?

Anyone experience this before? Any help is greatly appreciated, thanks for reading!

Re: Are Session files routinely cleaned out?

Posted: Tue Apr 15, 2014 2:18 pm
by rph
They'll be automatically cleaned up but it will be dependent on your system setup. If you're using an older OpenCart version check the value for session.gc_maxlifetime in php.ini. 1.5.4 and earlier had a lifetime of 4+ months.

Re: Are Session files routinely cleaned out?

Posted: Wed Apr 16, 2014 12:57 pm
by beeman
I just checked and it was set at 12,000,000 (approx. 4 months) what is the recommended settings now? is one month okay?

Cheers

Re: Are Session files routinely cleaned out?

Posted: Wed Apr 16, 2014 4:13 pm
by rph
I'd put it for a couple hours, maybe a day or two on the long end. Current setting in the github master is 3600 (one hour).