Session temp files?

I’m running a simple WEBrick server for a small rails website. I
probably
get less than 100 hits per hour. I just looked in /tmp on the server
and
there are over 10,000 ruby_sess.* temp files containing:

" hash{"
flashIC:'ActionController::Flash::FlashHash{:
@used{

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?

Thanks,

Gary

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
to
periodically clean.

if the excess files are bothersome, you could always change to a
different
store,
Peak Obsession
or ActiveRecordStore,
http://railswiki.pdxruby.org/HowtoChangeSessionStore.html
among others.