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
Hey,
Actually this case is not tested/not targeted, as this lib is mainly for "Mysql server has gone away" type errors for long idling connections.
But it could be a valid use case, if there's the resource to implement it.
And of course #7 is a long overdue task to clarify the misunderstandings...
Yeah, I agree with @adamturcsan @Moln can you give a valid use-case or real-world situation when such error occurs?
From my point of view, it's only possible in case if the server is MySQL server is down, which doesn't seem like a good thing in the first place. You probably want to set up monitoring with alerts on your MySQL server to prevent this. Also, you probably should inform your users that the DB is down.
Anyway, I would recommend making PR if you still want to implement this. But please, make this optional. Somebody may not have MySQL alerts in place and will rely on the server log, looking for errors.
Thanks!
At that time , I'm maintaining and upgrading my Mysql server.
This must stop for a while. Then my daemon program throw an exception ( No PDO connection is set ) and exit.
So I saw the ReconnectingPDO.php code. Then I know , this is just to work for long idling connections.
The last, I change to use doctrine/dbal, and using ping() and connect() instead. Because I read this issue doctrine/dbal#1454
Expected result:
Reconnect, when server was start.
Actual result:
Throw
ReconnectingPDOException: No PDO connection is set
.And a
PHP Notice: Undefined property: LegoW\ReconnectingPDO\ReconnectingPDO::$connection
The text was updated successfully, but these errors were encountered: