|
Posted by ctclibby on 09/25/06 14:27
MeAgain!
ctclibby wrote:
> Hi All
>
> Seem to be getting zombie sessions. /tmp/sess_[put your favorite 32
Thought that you might want to know what I found out. Of course,
things went sideways after I started figuring out what to do about the
..subject.
User sessions are kept in a MySql database which lets them return to
where they are/were when something happens. Well, found that if a user
just quit the logged in session, the database was not cleaned and would
stay there; as how would it know that the user has gone? I probably
knew this in the back of my mind, but didn't do anything about it until
now. I created a cleaner to run at midnight(ish) looking for database
sessions that were older than 2 days. This cleaner also removed the
zombie sessions from the filesystem also checking for the 2 day
thingie. Now imagine my supprise while testing the cleaner that NONE
of the the file system session zombies were in the session database.
So I started looking elsewhere.
I found that a session was started in an unrelated piece of code that
didn't have anything to do with user login. This put a 0 filesize
session in /tmp. Think that I got that fixed, time will tell. I
started reading on the 'garbage cleanup' and will play around with
that.
I guess that the end result is probably more of a 'why does it do that'
issue than anything and doesn't hamper the way php creates new
sessions. How many combinations of 32 characters to generate the
session id? Pretty slim chance of that happening twice.
have fun!
Navigation:
[Reply to this message]
|