SQLSTATE[HY000] 1205 Lock wait timeout exceeded

Hallo, ich bekomme immer mal wieder (beinahe täglich) folgende Fehlermeldung: [2014-07-11 11:08:46] core.ERROR: exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /www/htdocs/w00e7113/oberland.la/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:854 Stack trace: #0 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(854): PDOStatement-\>execute() #1 /www/htdocs/w00e7113/oberland.la/engine/Library/Doctrine/ORM/Persisters/BasicEntityPersister.php(481): Doctrine\DBAL\Connection-\>executeUpdate('UPDATE s\_blog S...', Array, Array) #2 /www/htdocs/w00e7113/oberland.la/engine/Library/Doctrine/ORM/Persisters/BasicEntityPersister.php(369): Doctrine\ORM\Persisters\BasicEntityPersister-\>updateTable(Object(Shopware\Models\Blog\Blog), 's\_blog', Array, NULL) #3 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1000): Doctrine\ORM\Persisters\BasicEntityPersister-\>update(Object(Shopware\Models\Blog\Blog)) #4 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(341): Doctrine\ORM\UnitOfWork-\>executeUpdates(Object(Doctrine\ORM\Mapping\ClassMetadata)) #5 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(389): Doctrine\ORM\UnitOfWork-\>commit(Object(Shopware\Models\Blog\Blog)) #6 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Controllers/Frontend/Blog.php(319): Doctrine\ORM\EntityManager-\>flush(Object(Shopware\Models\Blog\Blog)) #7 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Action.php(159): Shopware\_Controllers\_Frontend\_Blog-\>detailAction() #8 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Dispatcher/Default.php(528): Enlight\_Controller\_Action-\>dispatch('detailAction') #9 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Front.php(228): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #10 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Kernel.php(141): Enlight\_Controller\_Front-\>dispatch() #11 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(473): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(256): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #13 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(430): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #14 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(330): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #15 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(178): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #16 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(194): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #17 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /www/htdocs/w00e7113/oberland.la/shopware.php(91): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #19 {main} Next exception 'Doctrine\DBAL\DBALException' with message 'An exception occurred while executing 'UPDATE s\_blog SET views = ? WHERE id = ?' with params [332, 11]: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /www/htdocs/w00e7113/oberland.la/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91 Stack trace: #0 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(863): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(PDOException), 'UPDATE s\_blog S...', Array) #1 /www/htdocs/w00e7113/oberland.la/engine/Library/Doctrine/ORM/Persisters/BasicEntityPersister.php(481): Doctrine\DBAL\Connection-\>executeUpdate('UPDATE s\_blog S...', Array, Array) #2 /www/htdocs/w00e7113/oberland.la/engine/Library/Doctrine/ORM/Persisters/BasicEntityPersister.php(369): Doctrine\ORM\Persisters\BasicEntityPersister-\>updateTable(Object(Shopware\Models\Blog\Blog), 's\_blog', Array, NULL) #3 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1000): Doctrine\ORM\Persisters\BasicEntityPersister-\>update(Object(Shopware\Models\Blog\Blog)) #4 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(341): Doctrine\ORM\UnitOfWork-\>executeUpdates(Object(Doctrine\ORM\Mapping\ClassMetadata)) #5 /www/htdocs/w00e7113/oberland.la/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(389): Doctrine\ORM\UnitOfWork-\>commit(Object(Shopware\Models\Blog\Blog)) #6 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Controllers/Frontend/Blog.php(319): Doctrine\ORM\EntityManager-\>flush(Object(Shopware\Models\Blog\Blog)) #7 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Action.php(159): Shopware\_Controllers\_Frontend\_Blog-\>detailAction() #8 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Dispatcher/Default.php(528): Enlight\_Controller\_Action-\>dispatch('detailAction') #9 /www/htdocs/w00e7113/oberland.la/engine/Library/Enlight/Controller/Front.php(228): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp)) #10 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Kernel.php(141): Enlight\_Controller\_Front-\>dispatch() #11 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(473): Shopware\Kernel-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(256): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) #13 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(430): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true) #14 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(330): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true) #15 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(178): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #16 /www/htdocs/w00e7113/oberland.la/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpCache/HttpCache.php(194): Shopware\Components\HttpCache\AppCache-\>lookup(Object(Symfony\Component\HttpFoundation\Request), true) #17 /www/htdocs/w00e7113/oberland.la/engine/Shopware/Components/HttpCache/AppCache.php(113): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /www/htdocs/w00e7113/oberland.la/shopware.php(91): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request)) #19 {main} [] [] Weiß jemand woran das liegen könnte? Habe bereits den Parameter „innodb_lock_wait_timeout“ von 50 auf 100 Sekunden verdoppelt, aber das bringt nicht wirklich eine Verbesserung.

Niemand eine Idee?

Ich wühle den Thread mal wieder hoch, wir bekommen eine ähnliche Fehlermeldung. Hat jemand eine Idee, wie das gefixt werden könnte?

Same here. Jemand ne Idee?

Um die Inetgrität der Datenbank zu gewährleisten, können nicht zwei unabhängige Prozesse parallel Schreibzugriffe auf eine Tabelle durchführen. Einer der Prozesse muss warten. Übersteigt die Wartezeit den in der DB-Konfiguration eingestellten Time-Out-Wert, entsteht dieser Fehler.

Falls ein Prozess - von Shopware oder einem Plugin oder z. B. einem DB-Backup des Hosting - regelmäßig einfriert, kann man dies in Mysql-Konsole mit Show processlist versuchen einzugrenzen.

Alternativ kann man den Time-Out-Wert des Mysql-Servers hoch setzen. In den Default-Einstellungen ist der Time-Out relaiv hoch, tritt dieser Fehlertyp dennoch häufiger auf, ist es wahrscheinlich am sinnvollsten auf  leistungsfähigeres System zu setzen.