WCF 服务调用获取 queued.Even 一段时间获取 500 内部服务器错误
WCF service call getting queued.Even some time get 500 internal server error
我有一个 WCF (.net 4.5.2) 应用程序托管在 IIS 8.5 Windows 2012 R2 机器上,它调用另一个 WCF(.net 4.5.2) 应用程序托管在另一个 IIS 8.5 Windows 2012 R2 机器。问题是如果有大量呼叫(比如说 200+),我的请求似乎正在排队。
知道我做了什么特别的改进吗?两台机器都有 4 个内核和 4 GB ram
编辑
目前我已经尝试在机器配置中进行以下调整
<!-- <processModel autoConfig="true" /> -->
<processModel autoConfig="false" maxWorkerThreads="1400" maxIoThreads="1400" minWorkerThreads="10" />
我也随机看到的一个问题是我收到 500 内部错误。看起来呼叫永远不会到达第二台服务器。
完整的错误跟踪是
The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 192 bytes of the response were: '<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.8.0</center>
</body>
</html>
'.
System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 192 bytes of the response were: '<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.8.0</center>
</body>
</html>
'. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
log4net 数据库日志记录被发现是罪魁祸首。数据库日志记录一个接一个地发生,所以我将 log4net 的 bufferSize 属性 增加到 10。如果有任何更好的改进建议,请告诉我。
我有一个 WCF (.net 4.5.2) 应用程序托管在 IIS 8.5 Windows 2012 R2 机器上,它调用另一个 WCF(.net 4.5.2) 应用程序托管在另一个 IIS 8.5 Windows 2012 R2 机器。问题是如果有大量呼叫(比如说 200+),我的请求似乎正在排队。 知道我做了什么特别的改进吗?两台机器都有 4 个内核和 4 GB ram
编辑 目前我已经尝试在机器配置中进行以下调整
<!-- <processModel autoConfig="true" /> -->
<processModel autoConfig="false" maxWorkerThreads="1400" maxIoThreads="1400" minWorkerThreads="10" />
我也随机看到的一个问题是我收到 500 内部错误。看起来呼叫永远不会到达第二台服务器。 完整的错误跟踪是
The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 192 bytes of the response were: '<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.8.0</center>
</body>
</html>
'.
System.ServiceModel.ProtocolException: The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 192 bytes of the response were: '<html>
<head><title>500 Internal Server Error</title></head>
<body bgcolor="white">
<center><h1>500 Internal Server Error</h1></center>
<hr><center>nginx/1.8.0</center>
</body>
</html>
'. ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---
log4net 数据库日志记录被发现是罪魁祸首。数据库日志记录一个接一个地发生,所以我将 log4net 的 bufferSize 属性 增加到 10。如果有任何更好的改进建议,请告诉我。