Skip to content

Commit

Permalink
Do not use persistent pdo connections
Browse files Browse the repository at this point in the history
At least for blast requests reuse of connections does not work properly.
Instead a lot of open connections remain leading to "Too many clients already"
Fix #57
  • Loading branch information
iimog committed Jul 14, 2017
1 parent 0de0752 commit c690064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/includes/TranscriptDB/db.php
Expand Up @@ -34,7 +34,7 @@ function get_db_connection($connstr, $username, $password) {
$db = new \LoggedPDO\PDO($connstr, $username, $password, null, $logger);
//$db->log_replace_params = false;
} else {
$db = new PDO($connstr, $username, $password, array(PDO::ATTR_PERSISTENT => true, PDO::ATTR_EMULATE_PREPARES => false));
$db = new PDO($connstr, $username, $password, array(PDO::ATTR_PERSISTENT => false, PDO::ATTR_EMULATE_PREPARES => false));
}
#usually stop execution on DB error
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Expand Down

0 comments on commit c690064

Please sign in to comment.