none
c# MySql fetal error when inserting largText to mysql (a connection attempt failed....) RRS feed

  • Question

  • hello

    i useing a Remote MySql in C#

    i can insert largtext(6MB) to mysql successfully but

    when i want to execute an insert largtext(for example 15MB) query to mysql

    i got this error:

    MySql.Data.MySqlClient.MySqlException (0x80004005): Fatal error encountered during command execution. ---> System.IO.IOException: Unable to write data to 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.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
       at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
       --- End of inner exception stack trace ---
       at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
       at MySql.Data.MySqlClient.TimedStream.Write(Byte[] buffer, Int32 offset, Int32 count)
       at MySql.Data.MySqlClient.MySqlStream.SendPacket(MySqlPacket packet)
       at MySql.Data.MySqlClient.NativeDriver.ExecutePacket(MySqlPacket packetToExecute)
       at MySql.Data.MySqlClient.NativeDriver.SendQuery(MySqlPacket queryPacket)
       at MySql.Data.MySqlClient.Driver.SendQuery(MySqlPacket p)
       at MySql.Data.MySqlClient.Statement.ExecuteNext()
       at MySql.Data.MySqlClient.PreparableStatement.Execute()
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
       at .... visual studio 2015\Projects\....\DBHelper.cs:line 287 - (line 287 :cmd.ExecuteNonQuery())

    what is that for and how can i fixed it?

    thank you for helping

    Tuesday, July 10, 2018 5:59 AM

Answers

All replies