After deploying a web project we suddenly started having serious issues with connections to one of the databases on our server.
We connect to two databases; the one with the most traffic seems to work fine.
On the other however, the log fills up with errors like:
(1130 occurences)
Type : Devart.Data.MySql.MySqlException, Devart.Data.MySql, Version=5.0.22.0, Culture=neutral, PublicKeyToken=09af7300eec23701
Message : Net packets out of order: received[1], expected[21]
(540 occurences)
Type : Devart.Data.MySql.MySqlException, Devart.Data.MySql, Version=5.0.22.0, Culture=neutral, PublicKeyToken=09af7300eec23701
Message : Lost connection to MySQL server during query
(2300 occurences)
Type : System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Connection must be opened.
We use connection pooling. The queries are not very complex, usually selects matching on an ID or a search string with some joins to other (rather small) tables.
Any pointers to how i can find out what is going on? This is running under IIS 7; sites using the same data access under IIS 6 seem unaffected.
A multitude of connection issues
1. Please make sure, that the connection object is not used in several threads simultaneously.
2. Try to assign the greater value to the MySqlCommand.CommandTimeout property (by default, it is 30 seconds) or set it to 0.
3. Could you please provide us with a small test project to reproduce the problem? Please send us your DDL and DML script and tell us the MySQL server version.
2. Try to assign the greater value to the MySqlCommand.CommandTimeout property (by default, it is 30 seconds) or set it to 0.
3. Could you please provide us with a small test project to reproduce the problem? Please send us your DDL and DML script and tell us the MySQL server version.
Thanks for the hints.
After examining our code more closely, it was discovered that the data access classes were being used in a static way - meaning all queries were piped through the same connection.
Edited the code so it now instantiates a new data access classes for each page request, and now it works like a dream.
Consider the case closed.
After examining our code more closely, it was discovered that the data access classes were being used in a static way - meaning all queries were piped through the same connection.
Edited the code so it now instantiates a new data access classes for each page request, and now it works like a dream.
Consider the case closed.