#87 cleanStaleSessions loads all sessions into memory

WebKit (58)
Ben Parker

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.


  • Ben Parker

    Ben Parker - 2007-01-28

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

  • Christoph Zwerschke

    Logged In: YES
    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.

  • Christoph Zwerschke

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

Log in to post a comment.