cgi sessions

  • Thread starter Javier Valencia
  • Start date
J

Javier Valencia

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?
 
K

Kent Sibilev

Javier Valencia said:
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
 
B

Bill Kelly

From: "Kent Sibilev said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top