On Feb 8, 1:20 pm, Chris Meller <[email protected]> wrote:
> Ever since I switched back to Habari on my live blog (yay!) I've been seeing 
> intermittent errors in the log:
>
> > PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 
> > 1062 Duplicate entry 'cfqsg58ehpkt01qh993adk5li7' for key 'PRIMARY'
>
> Looking at the backtrace, it's happening when Session::write() calls 
> DB::update(), which tries to INSERT INTO habari__sessions after it checks to 
> see if the record already exists (otherwise it would UPDATE instead of 
> INSERT).
>
> A while back I did run a couple of basic tests to make sure the DB::update() 
> logic was working properly when deciding whether to UPDATE or INSERT and I 
> didn't find any problems, but the session errors persist.
>
> I find it highly highly unlikely that PHP is actually generating duplicate 
> session IDs, particularly on my pathetic little blog, but I'm at a loss for 
> where to look next. Does anyone else see these errors in their log?

I get them occasionally, usually with MySQL, but sometimes with
SQLite. There is something flaky with the Sessions class. As shown in
ticket #1105, problems with queries to the sessions table brought down
my db, though regular emptying of the table has prevented a recurrence
of the problem.

Rick

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to