note 116073 deleted from pdo.connections by salathe

From: Date: Fri, 07 Nov 2014 11:17:07 +0000
Subject: note 116073 deleted from pdo.connections by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-200834@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- The comment http://php.net/manual/en/pdo.connections.php#114822 makes a very valid point. When we use the suggested method of dropping the connection by doing: <?php $pdo = null; ?> The connection doesn't get dropped as described in the documentation. You may run into the issue when running too many unit tests (it's never too many, though), resulting in PostgreSQL hitting the connection limit after 150's test. The workaround is to use gc_collect_cycles() after unsetting the $pdo. <?php $pdo = null; gc_collect_cycles() ?> The relevant bug is reported here http://bugs.php.net/bug.php?id=68360, upvote if you care.

« previous php.notes (#200834) next »