[Tickets #13439] Significant increase in used MySQL DB connections

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Aug 13 18:30:17 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/13439
------------------------------------------------------------------------------
  Ticket             | 13439
  Created By         | mmarx at netdmon.de
  Summary            | Significant increase in used MySQL DB connections
  Queue              | Horde Base
  Version            | 5.2.1
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


mmarx at netdmon.de (2014-08-13 18:30) wrote:

Hello Horde Team,

I upgraded horde to the latest stable release (5.2.1) via pear and ran  
into MySQL connections troubles. I was unable to login to horde, I  
just got the following errors. See below from which version I upgraded.

---- MySQL connection errors ----
WARN: HORDE [horde] PHP ERROR: mysqli::mysqli(): (HY000/2002): Can't  
connect to local MySQL server through socket  
'/var/run/mysqld/mysqld.sock' (12) [pid 13963 on line 130 of  
"/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
EMERG: HORDE [horde] Connect failed: (2002) Can't connect to local  
MySQL server through socket '/var/run/mysqld/mysqld.sock' (12) [pid  
9650 on line 133 of "/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
WARN: HORDE [horde] PHP ERROR: mysqli::mysqli(): (HY000/1040): Too  
many connections [pid 13963 on line 130 of  
"/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
EMERG: HORDE [horde] Connect failed: (1040) Too many connections [pid  
13963 on line 133 of "/usr/share/php/Horde/Db/Adapter/Mysqli.php"]
---------------------------------

After my first attempt of an upgrade I got "Out of Memory" errors, I'm  
using a small vhost to host my very small horde installation and  
therefore it hasn't really much memory. I fixed the OoM error by  
limiting MySQL to "max_connections=70", default value was 100 before.
I figured out that the new horde version uses a lot more database  
connections which basically breaks my system. I downgraded the horde  
installation back to 5.1.6, including all the previous versions of all  
packages, and it's working fine again. I have around 8-10 connections  
to my MySQL database by other applications, so with horde 5.1.6 I  
estimate that only 2-10 mysql connections are used while in 5.2.1  
there are already over 80 connections used just by accessing the login  
page. But it looks like those more than 80 connections are  
simultaneously and very short lived because I was unable to catch them  
with "mysql> show processlist;".

---- Horde 5.1.6 ----
mysql> show status like '%connections%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Connections          | 724   |
| Max_used_connections | 14    |
+----------------------+-------+
----------------------------

---- After the upgrade to 5.2.1 ------
mysql> show status like '%connections%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Connections          | 608   |
| Max_used_connections | 71    |   <- hits the max_connections limit
+----------------------+-------+
----------------------------

---- upgrades ----
PEAR.HORDE.ORG AVAILABLE UPGRADES (STABLE):
===========================================
CHANNEL        PACKAGE             LOCAL           REMOTE          SIZE
pear.horde.org Horde_ActiveSync    2.16.9 (stable) 2.17.0 (stable) 229kB
pear.horde.org Horde_Compress_Fast 1.0.2 (stable)  1.0.3 (stable)  12.2kB
pear.horde.org Horde_Core          2.11.2 (stable) 2.13.0 (stable) 1587kB
pear.horde.org Horde_Date          2.0.11 (stable) 2.0.12 (stable) 67kB
pear.horde.org Horde_HashTable     1.1.3 (stable)  1.2.0 (stable)  15.5kB
pear.horde.org Horde_Imap_Client   2.23.1 (stable) 2.24.2 (stable) 213kB
pear.horde.org Horde_Mail          2.3.0 (stable)  2.4.0 (stable)  31kB
pear.horde.org Horde_Mime          2.4.2 (stable)  2.4.4 (stable)  94kB
pear.horde.org Horde_Smtp          1.5.2 (stable)  1.6.0 (stable)  28kB
pear.horde.org Horde_SyncMl        2.0.3 (stable)  2.0.4 (stable)  132kB
pear.horde.org Horde_Util          2.4.0 (stable)  2.5.0 (stable)  35kB
pear.horde.org horde               5.1.6 (stable)  5.2.1 (stable)  2743kB
pear.horde.org imp                 6.1.7 (stable)  6.2.1 (stable)  4796kB
pear.horde.org ingo                3.1.4 (stable)  3.2.0 (stable)  1439kB
pear.horde.org kronolith           4.1.5 (stable)  4.2.1 (stable)  2501kB
pear.horde.org mnemo               4.1.3 (stable)  4.2.1 (stable)  1167kB
pear.horde.org nag                 4.1.4 (stable)  4.2.1 (stable)  1598kB
pear.horde.org trean               1.0.3 (stable)  1.1.1 (stable)  579kB
pear.horde.org turba               4.1.4 (stable)  4.2.1 (stable)  1896kB
------------------

Tell me if you need further information, but I'm currently reluctant  
to upgrade to 5.2.1 again because then horde is completely broken.

Kind Regards

Matthias Marx





More information about the bugs mailing list