2015-11-04 1 views
1

J'ai une application WCF (.net 4.5.2) hébergée sur une machine IIS 8.5 Windows 2012 R2 qui appelle une autre application WCF (.net 4.5.2) hébergé sur une autre machine IIS 8.5 Windows 2012 R2. Le problème est que wehn il y a des appels en bloc (disons 200+) mes demandes semblent faire la queue. Une idée Quelle amélioration particulière je fais? Les deux machines a 4 cœurs et 4 Go de RAML'appel de service WCF est mis en file d'attente.Même temps, 500 erreur serveur interne

Modifier En ce moment j'ai essayé avec tweak suivante dans la machine config

<!-- <processModel autoConfig="true" /> --> 
    <processModel autoConfig="false" maxWorkerThreads="1400" maxIoThreads="1400" minWorkerThreads="10" /> 

Un problème que je vois aussi est au hasard que je reçois 500 erreur interne. On dirait que les appels n'atteignent jamais le deuxième serveur. trace d'erreur complète est

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 --- 
+0

[Vous pouvez rendre votre service WCF asynchrone] (http://blogs.msdn.com/b/endpoint/archive/2010/11/13/simplified-asynchronous-programming-model-in-wcf-with-async -await.aspx) et bénéficier de IOCP – MickyD

+0

C'est le changement d'architecture que nous ne pouvons pas nous permettre pour le moment. Nous avons également prévu de passer d'un service basé sur le savon à un service reposant, mais au moment où je cherche obtenir des performances maximales avec l'application actuelle via possible toute configuration tweak –

+0

Peut-être. Il est beaucoup plus facile d'ajouter un préfixe 'Task <>' (et quelques bits et morceaux) à vos méthodes WCF que de réécrire tout comme REST. Je vous souhaite bonne chance – MickyD

Répondre

0

exploitation forestière log4net db a été trouvé comme coupable. La consignation de la base de données s'est déroulée une par une, donc j'ai augmenté la propriété bufferSize de log4net à 10. S'il y a une meilleure suggestion à améliorer alors s'il vous plaît faites le moi savoir.