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
Connection closed exceptions after migration from mysql.data to mysql connector #661
Comments
Hi, Just an update to the above case. I've just noticed that on upper environments I also saw similar errors with mysql.data so I wouldn't attribute this problem to the mysql-connector. It's time for some additional code-review. |
If you're using async code (e.g., It would be helpful to see the full exception call stack, but I'm guessing it's possible a It may help to enable debug-level logging and see if that provides any clues: https://mysqlconnector.net/overview/logging/ |
The timeouts are happening when the connection (session) is reset between uses, one option is to disable the connection reset its just a connection string change add ConnectionReset=false |
The error message is the same as #667. Can you post the full call stack from when this happens, so I can see if it's the same bug? |
Sure,
|
Hi,
I hope someone can advise on the following problem. I have a windows service that I'm trying to migrate from Mysql.Data to mysqlconnector-net. With other services the process was fairly smooth but the target databases arent under high load.
After the upgrade, I've started to notice exceptions like the following one: 'System.InvalidOperationException: Connection must be Open; current state is Closed'
The database server is quite busy, a lot of connections open and I can see that some insert operations take 20s. This is expected. This is our test environment and the RDS instance is quite small. I'm guessing that the sql-related operations just take a lot of time, connections are closed in the meantime and I end up with this problem.
What I don't understand is why am I seeing these exceptions after upgrade ? Connection count hasn't really changed and default values for command timeouts and connection timeouts seem to be the same when I compare mysql.data and mysqlconnector.
Thanks,
TP
The text was updated successfully, but these errors were encountered: