Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#22 - switching native PDO to custom PersistentPDO which prevents timeouts #30

Merged
merged 2 commits into from
Jun 30, 2022

Conversation

michalbiarda
Copy link
Contributor

Based on remote server configuration MySQL can hang in different places, so I decided to build custom PDO class that automatically reconnects using already provided data. There should be no infinite reconnects if the server really hanged, because the connection initialization is not wrapped in any way.

Copy link

@navarr navarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Persistent" is a bit of a misnomer here as it has an entirely different meaning in the context of PHP PDO (as there is such thing as a PDO persistent connection, which this does not have).

"ReconnectingPDO" might be a better name.

@michalbiarda michalbiarda merged commit 095ce6b into 4.0-develop Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants