#87 cleanStaleSessions loads all sessions into memory

closed-accepted
WebKit (58)
5
2007-01-30
2007-01-28
Ben Parker
No

SessionStore's definition of cleanStaleSessions iterates over self.items(), which loads all the sessions into memory. This effectively eliminates the purpose of SessionFileStore.

This was repeatedly crashing a Webware process running SessionDynamicStore during periods of peak traffic, when abnormally high numbers of sessions were created.

Changing the loop in SessionStore to iterate over the keys, rather than the items, fixes the problem. A patch is attached.

Discussion

  • Ben Parker
    Ben Parker
    2007-01-28

    Patch to change cleanStaleSessions to iterate over the keys, rather than the items.

     
    Attachments
  • Logged In: YES
    user_id=193957
    Originator: NO

    You're right, the item() call resulted in all sessions being loaded from the filesystem. Very good fix, thank's a lot. Patched in Rev 6159.

     
    • assigned_to: nobody --> cito
    • status: open --> closed-accepted