Skip to content

PdoSessionHandler Lock wait timeout exceeded #13411

@kbond

Description

@kbond

After upgrading to 2.6.3 and switching to the new PdoSessionHandler schema I have been getting these errors in my log sporadically:

[2015-01-12 13:28:59] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction" at /../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php line 513 {"exception":"[object] (PDOException(code: HY000): SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction at /../vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/PdoSessionHandler.php:513)"} []

It doesn't appear to be affecting the end users. Seems like it is happening silently.

I followed the updated cookbook article: http://symfony.com/doc/current/cookbook/configuration/pdo_session_storage.html

The sessions table is in the same database as my app. Could that be causing the problem? Reading the comments for PdoSessionHandler::LOCK_TRANSACTIONAL this should not use the same connection but this wouldn't be the case, would it?

I am using MySQL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions