WCF同步框架现有连接已被远程主机强制关闭

WCF同步框架现有连接已被远程主机强制关闭,wcf,iis,microsoft-sync-framework,Wcf,Iis,Microsoft Sync Framework,更新这似乎是由于服务器的物理内存不足造成的 我正在使用WCF同步框架将大约200000条记录上载到数据库。通过使用SQLServerProfiler,我能够验证web服务器是否收到记录并开始将其写入数据库。在写入大约60000条记录后,web服务器抛出一个异常。在一次尝试中,异常在7分钟后抛出;在另一次尝试中,9分钟后引发异常。堆栈跟踪 System.ServiceModel.CommunicationException: An error occurred while receiving th

更新这似乎是由于服务器的物理内存不足造成的

我正在使用WCF同步框架将大约200000条记录上载到数据库。通过使用SQLServerProfiler,我能够验证web服务器是否收到记录并开始将其写入数据库。在写入大约60000条记录后,web服务器抛出一个异常。在一次尝试中,异常在7分钟后抛出;在另一次尝试中,9分钟后引发异常。堆栈跟踪

System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to https://ecosystems.icfwebservices.com/Services/EDT/DataCacheSync.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.
---> System.IO.IOException: Unable to read data from 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.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 System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---

Server stack trace: 
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
我有几个web.config设置,旨在防止超时发生

<configuration>
  <system.web>
    <compilation debug="false" targetFramework="4.0"></compilation>
    <httpRuntime executionTimeout="100000" />
  </system.web>
</configuration>

由于您使用的是WCF,因此需要在配置文件中设置绑定超时设置

但我认为这不是超时问题,因为异常在不同的时间后出现。
您当前拥有的异常信息不够详细,无法帮助您。我建议您在服务端打开WCF跟踪,以查看真正的问题