[#9173] Deadlocks in mysql SessionHandler under heavy loads
Summary Deadlocks in mysql SessionHandler under heavy loads
Queue Horde Framework Packages
Queue Version Git master
Type Enhancement
State Rejected
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester luc.germain (at) usherbrooke (dot) ca
Created 2010-08-11 (2873 days ago)
Updated 2014-03-26 (1550 days ago)
Assigned 2010-08-13 (2871 days ago)
Resolved 2014-03-26 (1550 days ago)
Patch Yes

2014-03-26 13:30:56 Jan Schneider Comment #3
State ⇒ Rejected
Reply to this comment
Rejecting because the consequences are not completely foreseeable, 
there's no empiric feedback from the community, and the default 
isolation level can also be set in the MySQL configuration.
2014-03-26 13:24:37 Jan Schneider Version ⇒ Git master
Queue ⇒ Horde Framework Packages
2010-08-13 13:04:37 Jan Schneider Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Assigned
Reply to this comment
Transaction isolation is over my head.
2010-08-11 20:05:45 luc (dot) germain (at) usherbrooke (dot) ca Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Deadlocks in mysql SessionHandler under heavy loads
Queue ⇒ Horde Groupware Webmail Edition
Milestone ⇒
Patch ⇒ Yes
New Attachment: sessionhandler.patch Download
Reply to this comment
We use the mysql Sessionhandler of Horde on our installation, and 
under heavy loads (> 500 users), we start having a lot of deadlocks 
messages in the logs:

Aug 05 09:45:47 HORDE [error] [horde] Error writing session data: 
Deadlock found when trying to get lock; try restarting transaction 
[pid 27607 on line 185 of 

When this happens, users have to try to login many times before 
getting access.

We added the following statement to the mysql driver and it solved the 
problem nicely:


ref: http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html

No more deadlock seen even for > 2000 active users

Saved Queries