No se pueden insertar datos de la aplicación alojada localmente en la base de datos Appharbor MySQL (excepción de tiempo de espera)

I uploaded images to a local database from a locally hosted app. It worked fine!

I tried uploading it to an Appharbor MySQL database and I'm getting the following error.

( connection settings are fine. I have tested insertion with sample string and numbers )

MySql.Data.MySqlClient.MySqlException (0x80004005): 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, Boolean force) at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlConnection.HandleTimeoutOrThreadAbort(Exception ex) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at Healthcare.WebForm1.Button1_Click(Object sender, EventArgs e) in C:\Users\BOSE\documents\visual studio 2010\Projects\Healthcare\Healthcare\careSeekersUI.aspx.cs:line 43

¿Qué debo hacer?

preguntado el 10 de marzo de 12 a las 07:03

How did you try to upload the data? Please post some code for this. -

1 Respuestas

You should increase the CommandTimeout or use a something other than a webform to insert the data (MySQL Workbench me viene a la mente).

respondido 10 mar '12, 07:03

I haven't installed the Workbench. All I have from Appharbor is the connection string. Is there anyway I could add more parameters to the connection string to increase the timeout time? - sbose

The link says:MySQL currently does not support any method of canceling a pending or executing operation. All commands issues against a MySQL server will execute until completion or exception occurs. - sbose

Okay I tried with a better internet connection. Its fine now :-) - sbose

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.