Forum: Ruby on Rails session temp files?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Gary H. (Guest)
on 2005-12-18 18:16
(Received via mailing list)
I'm running a simple WEBrick server for a small rails website.   I
get less than 100 hits per hour.  I just looked in /tmp on the server
there are over 10,000 ruby_sess.* temp files containing:

"       hash{"

They've piled up so much that I can't even rm -f ruby*.   Bash complains
"argument list too long"

How do people typically clean these up?    A cron job?  Can they all be
safely deleted or should I only delete "older than...." files?


Lou V. (Guest)
on 2005-12-18 19:07
(Received via mailing list)
to delete session files older than 120 minutes, you might try,

   find /dir/to/clean -type f -iname "ruby_sess*" -cmin +120 -exec rm {}

for a low-volume site i would continue to use pstore, and run a cron job
periodically clean.

if the excess files are bothersome, you could always change to a
or ActiveRecordStore,
among others.
This topic is locked and can not be replied to.