[Catalyst] Session duplicate key constraints on concurrent requests

Erik Wasser erik.wasser at iquer.net
Fri Oct 7 16:11:22 GMT 2011


On Friday 07 October 2011 14:48:14 Tobias Kremer wrote:

> I've written about this issue a couple of times in the past and it
> seems that this still hasn't been fixed. Here's what's happening:
> 
> 1. Request A comes in with an expired session cookie, C::P::Session
> tries to find the session for the given cookie but finds nothing.
> 2. Meanwhile, Request B comes in, also trying to find the session for
> the same(!) cookie and goes away with empty hands as well.
> 3. Both requests try to insert a new session, one succeeds, the other
> dies(!) with a duplicate key constraint error from MySQL.

How will the session key calculated? Any idea? Randomly? So two random 
processes will calculate the same session value?

-- 
So long... Erik




More information about the Catalyst mailing list