-
Notifications
You must be signed in to change notification settings - Fork 345
How to force close a pooled connection? #1118
-
There is a case that reset connection for XA transactions may bring back a prepared XA transaction which is already rollback by repairer, I don't want all XA related connections are not pooled, but just to force close connections that are running into issues
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
The only way is to call MySqlConnection.ClearPool
, which closes all pooled connections with the same connection string.
Beta Was this translation helpful? Give feedback.
All reactions
-
ClearPool does not work, I eventually figure out that I can do "KILL CONNECTION_ID()" to kill the current connection and turns out that this driver can handle the error from server for killing, thanks for this!
Beta Was this translation helpful? Give feedback.