From 7caab1de3fd3cbac502a684f351ff699e1404bdc Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Wed, 19 Feb 2014 11:13:28 -0400 Subject: [PATCH] Disabling persisten connection on DbSession Handler, it was opening too many mysql connections, now just open one per client --- gulliver/core/Session/PmSessionHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gulliver/core/Session/PmSessionHandler.php b/gulliver/core/Session/PmSessionHandler.php index 610706a0b..130e29442 100644 --- a/gulliver/core/Session/PmSessionHandler.php +++ b/gulliver/core/Session/PmSessionHandler.php @@ -73,7 +73,7 @@ class PmSessionHandler //implements SessionHandlerInterface * The persistent connection cache allows you to avoid the overhead of establishing a new connection * every time a script needs to talk to a database, resulting in a faster web application. */ - PDO::ATTR_PERSISTENT => true, + PDO::ATTR_PERSISTENT => false, // <- using "true", is causing open many mysql connections, disabled by now PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_EMULATE_PREPARES => false ) @@ -150,7 +150,7 @@ class PmSessionHandler //implements SessionHandlerInterface // close the connection when your script ends. // this was commented to take advantage of PDO persistence connections - //$this->db = null; + $this->db = null; $this->log("close() was called");