Bug #62457 Problem when the system up from sleep mode my mysql quries fails
Submitted: 17 Sep 2011 6:42 Modified: 14 Feb 2012 12:55
Reporter: Lalit Arora Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.86 OS:Windows
Assigned to: CPU Architecture:Any

[17 Sep 2011 6:42] Lalit Arora
Description:
I have started mysql as a window service in my application  and when the system  come up from the sleep mode mysql service query fails and i will get the following error message 

MySql.DataMySql.Data.MySqlClient.MySqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.TimeoutException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   --- End of inner exception stack trace ---
   at MyNetworkStream.HandleOrRethrowException(Exception e)
   at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int32& insertedId)
   at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId)
   at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   --- End of inner exception stack trace ---
   at MySql.Data.MySqlClient.MySqlConnection.HandleTimeoutOrThreadAbort(Exception ex)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
   at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
   at VMS_DataLayer.TableAdapters.Adap_v_logs.insert(String logType, String userName, String message, Int32 device_id, Int32 sub_category_id)

How to repeat:
Just put your system in sleep mode and when it comes up mysql service failed to response
[17 Sep 2011 9:44] Valeriy Kravchuk
How much time passed after putting system to sleep and before starting it back and trying to execute the query?
[4 Oct 2011 14:28] Lalit Arora
Thanks for your reply
Sorry for being late sir

It generally coames after 8 hours and we already set the wait time out for maximum that is 24 days 
and one really bad thing is happening when adopter fails once it will never recover again i have to restart my application agail
[2 Dec 2011 21:12] Hartmut Holzgraefe
It's probably not wait_timeout you're running into but net_read_timeout / net_write_timeout?
[14 Jan 2012 12:55] Sveta Smirnova
Thank you for the feedback.

Have you increased "net_read_timeout / net_write_timeout" as Hartmut suggested? Did it help?
[15 Feb 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".