Browse Source

Yii2 db persistent connection (#3708)

Joan Miquel 7 years ago
parent
commit
28ef10d4f3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      frameworks/PHP/yii2/app/index.php

+ 3 - 0
frameworks/PHP/yii2/app/index.php

@@ -18,6 +18,9 @@ $config = [
             'username' => 'benchmarkdbuser',
             'username' => 'benchmarkdbuser',
             'password' => 'benchmarkdbpass',
             'password' => 'benchmarkdbpass',
             'charset' => 'utf8',
             'charset' => 'utf8',
+            'attributes' => [
+                PDO::ATTR_PERSISTENT => true,
+            ]
         ],
         ],
         'urlManager' => [
         'urlManager' => [
             'enablePrettyUrl' => true,
             'enablePrettyUrl' => true,