<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="/h/themes/default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Deadlocks in mysql SessionHandler under heavy loads</title> 
  <pubDate>Wed, 22 May 2013 09:42:37 +0000</pubDate> 
  <link>http://bugs.horde.org/ticket/9173</link> 
  <atom:link rel="self" type="application/rss+xml" title="Deadlocks in mysql SessionHandler under heavy loads" href="http://bugs.horde.org/ticket/9173/rss" /> 
  <description>Deadlocks in mysql SessionHandler under heavy loads</description> 
 
   
   
  <item> 
   <title>We use the mysql Sessionhandler of Horde on our installation</title> 
   <description>We use the mysql Sessionhandler of Horde on our installation, and under heavy loads (&gt; 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 &quot;/htdocs/horde/lib/Horde/SessionHandler/mysql.php&quot;]

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:

mysql_query('SET TRANSACTION ISOLATION LEVEL READ COMMITTED;', $this-&gt;_db);

ref: http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html

No more deadlock seen even for &gt; 2000 active users</description> 
   <pubDate>Wed, 11 Aug 2010 20:05:45 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/9173#t59610</link> 
  </item> 
   
  <item> 
   <title>Transaction isolation is over my head.</title> 
   <description>Transaction isolation is over my head.</description> 
   <pubDate>Fri, 13 Aug 2010 13:04:37 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/9173#t59619</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
