You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I've been tuning the code, I noticed that it doesn't really create a persistent connection. To do so, it's necessary to add
'options' => [\PDO::ATTR_PERSISTENT] => true
However, that is just an option passed to PDO. The MySQL adapter will continue to create new connections, because the adapter simply creates a connection each time it is called.
Hello,
In the documentation, it is written that 'persistent' is a parameter: https://docs.phalcon.io/4.0/en/db-layer#connect
As I've been tuning the code, I noticed that it doesn't really create a persistent connection. To do so, it's necessary to add
'options' => [\PDO::ATTR_PERSISTENT] => true
However, that is just an option passed to PDO. The MySQL adapter will continue to create new connections, because the adapter simply creates a connection each time it is called.
https://github.com/phalcon/cphalcon/blob/master/phalcon/Db/Adapter/Pdo/AbstractPdo.zep
This should be made clear in the documentation.
The text was updated successfully, but these errors were encountered: