我使用npgsql连接器连接到PostgreSQL数据库。
平均而言,每50 000个查询中就有一个,我收到以下错误。 (这是在填充数据集时。)
这是例外消息:
The Connection is broken.
这是例外内部异常:
System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. --->
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
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 System.IO.BufferedStream.FlushWrite()
at Npgsql.NpgsqlQuery.WriteToStream(Stream outputStream)
at Npgsql.NpgsqlReadyState.QueryEnum(NpgsqlConnector context, NpgsqlCommand command)
at Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)
如果我想在dba中发帖,请告诉我。如果是的话,我会重新发布。
感谢。