[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

cgi sessions

Javier Valencia

2/8/2005 6:31:00 PM

Well, after some brain sucking, i've got the solution, i have been
creating several cgi objects, so finally it was a mess.

Code clean-up and working now.
But i see that sessions are stored in /tmp, and even setting the
'session_expires' with Time.now + 10, files remain in harddisk.

Also, i've seen that session.delete works and deletes the current
session file, but if it's not called (a user closes the browser when he
want) the file remains in hd, wasting resources.

Do you know how to manage those files?


2 Answers

Kent Sibilev

2/8/2005 10:49:00 PM

0

Javier Valencia <tigrezno@log01.org> writes:

> Well, after some brain sucking, i've got the solution, i have been
> creating several cgi objects, so finally it was a mess.
>
> Code clean-up and working now.
> But i see that sessions are stored in /tmp, and even setting the
> session_expires' with Time.now + 10, files remain in harddisk.
>
> Also, i've seen that session.delete works and deletes the current
> session file, but if it's not called (a user closes the browser when
> he want) the file remains in hd, wasting resources.
>
> Do you know how to manage those files?

You can install a cron job to periodically delete session files.

Cheers,
Kent


Bill Kelly

2/8/2005 11:43:00 PM

0

From: "Kent Sibilev" <ksibilev@bellsouth.net>
>
> Javier Valencia <tigrezno@log01.org> writes:
>
> > Well, after some brain sucking, i've got the solution, i have been
> > creating several cgi objects, so finally it was a mess.
> >
> > Code clean-up and working now.
> > But i see that sessions are stored in /tmp, and even setting the
> > session_expires' with Time.now + 10, files remain in harddisk.
> >
> > Also, i've seen that session.delete works and deletes the current
> > session file, but if it's not called (a user closes the browser when
> > he want) the file remains in hd, wasting resources.
> >
> > Do you know how to manage those files?
>
> You can install a cron job to periodically delete session files.

I'm using:

find ~/my-session-dir -type f -amin +60 | xargs rm

This deletes any files last accessed longer than 60
minutes ago. Our site doesn't have heavy traffic so
I just run the above command every time the CGI script
is invoked.


HTH,

Regards,

Bill