Skip to content

Error in documentation wrt persistent MySQL connection #15241

Closed
@DrJLT

Description

@DrJLT

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.

Metadata

Metadata

Assignees

Labels

5.0The issues we want to solve in the 5.0 releasebugA bug report

Type

No type

Projects

Status

Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions