Performance WCF服务呼叫正在排队。有时甚至出现get 500内部服务器错误

Performance WCF服务呼叫正在排队。有时甚至出现get 500内部服务器错误,performance,wcf,iis-8,windows2012,.net-4.5.2,Performance,Wcf,Iis 8,Windows2012,.net 4.5.2,我有一个托管在IIS 8.5 Windows 2012 R2计算机上的WCF(.net 4.5.2)应用程序,它调用托管在另一台IIS 8.5 Windows 2012 R2计算机上的另一个WCF(.net 4.5.2)应用程序。问题是有大量的呼叫(比如说200+),我的请求似乎在排队。 你知道我有什么特别的改进吗?这两台机器都有4个内核和4 GB ram 编辑 目前,我已经在机器配置中尝试了以下调整 <!-- <processModel autoConfig="true" />

我有一个托管在IIS 8.5 Windows 2012 R2计算机上的WCF(.net 4.5.2)应用程序,它调用托管在另一台IIS 8.5 Windows 2012 R2计算机上的另一个WCF(.net 4.5.2)应用程序。问题是有大量的呼叫(比如说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 ---
响应消息的内容类型text/html与绑定的内容类型不匹配(text/xml;charset=utf-8)。如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法。响应的前192个字节是:' 500内部服务器错误 500内部服务器错误
nginx/1.8.0 '. System.ServiceModel.ProtocolException:响应消息的内容类型text/html与绑定的内容类型不匹配(text/xml;charset=utf-8)。如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法。响应的前192个字节是:' 500内部服务器错误 500内部服务器错误
nginx/1.8.0 '.-->System.Net.WebException:远程服务器返回错误:(500)内部服务器错误。 在System.Net.HttpWebRequest.GetResponse()中 位于System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(时间跨度超时) ---内部异常堆栈跟踪的结束---
log4net数据库日志记录被认为是罪魁祸首。数据库日志记录一个接一个地发生,所以我将log4net的bufferSize属性增加到了10。如果有更好的改进建议,请告诉我

log4net数据库日志记录被认为是罪魁祸首。数据库日志记录一个接一个地发生,所以我将log4net的bufferSize属性增加到了10。如果有更好的改进建议,请告诉我

从IOCP中获益这是我们目前无法承受的架构变化。我们还计划从基于soap的服务转向restful服务,但目前我希望通过任何可能的配置调整来获得当前应用程序的最大性能。在WCF方法中添加
任务
前缀(以及一些比特和片段)要比将所有内容重新编写为REST容易得多。很可能祝你身体健康。您可以从这种非代码更改中获益,但是请注意链接中的警告。它可能只会延迟不可避免的延迟,因此会出现
async
建议。从IOCP中获益这是我们目前无法承受的架构变化。我们还计划从基于soap的服务转向restful服务,但目前我希望通过任何可能的配置调整来获得当前应用程序的最大性能。在WCF方法中添加
任务
前缀(以及一些比特和片段)要比将所有内容重新编写为REST容易得多。很可能祝你身体健康。您可以从这种非代码更改中获益,但是请注意链接中的警告。它可能只会延迟不可避免的延迟,因此会出现
async
建议。