From: Bill Kelly Date: 2005-02-09T08:43:20+09:00 Subject: Re: cgi sessions From: "Kent Sibilev" > > Javier Valencia 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