Replies: 2 comments 4 replies
-
IIRC there is no event sent when connection is closed since this is done outside the framework. Calling open() on the connection should be safe if it's open already but I'm not sure about that. |
Beta Was this translation helpful? Give feedback.
-
I recently tested this and from my tests you can basically close the connection at any time, it is reopened automatically if needed. @Mitirrli |
Beta Was this translation helpful? Give feedback.
-
Hello everyone, I am now encountering a problem.
There are many sleep processes in the online mysql database. After checking, I have roughly known the problem. Most of the problems are that some io operations are time-consuming and the connection is always occupied. What I want to do now is to monitor whether the database connection is closed within the specified time, and if it is not closed after the specified time, I can notify myself by email, so that I can catch some problems in time.
But I looked at the source code, and there is no corresponding event for closing the connection. I can't easily realize my idea, of course I can modify classMap, but this method is too rough.
Is there any way to replace the code without modifying the classMap? thanks~
Beta Was this translation helpful? Give feedback.
All reactions