Intermittent connection problem

I have a MySQL database running on Linux. The front end is a Windows server with a .Net web services. I intermittently get connection errors like:

The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.

The request channel timed out while waiting for a reply after 00:01:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.

The Query: UPDATE connectionids SET updatenumber = abs(updatenumber -1) WHERE connectionid = ##### AND connectionstatus = 1

The connectionids table has a few thousand rows.

We have also seen where the query browser will occasionally get a fatal error running a select on a table with less than 500 rows. Run the same query immediately after and the query executes fine.

Also, twice in the past month, out NDB cluster has crashed completely. The last time we started getting “too many connections” error messages.

Has anyone had similar experiences? Or have any suggestions?


Regarding the timeout values.

Check if you have any interactive_timout or session_timeout settings in the my.cnf file on the MySQL server.

In your description it doesn’t really sound like it but have you checked the .Net timeouts: probably-need-to.aspx

The other thing I can think about is if you have a firewall between the .NET server and the MySQL server and if that firewall has timeouts for established TCP sessions.