问题
I am trying to access a wcf service through a biztalk sendport(wcf-custom) with establishsecuritycontext = false . My application generates 80 orch instances and everytime only 2 of them give the following error and all others work properly.further if i increase the retrycount =1 then the two orch instances give a warning in the first attempt to connect to the service and complete successfully in the 2nd attempt.
the error message
Error Description: System.TimeoutException: Client is unable to finish the security negotiation within the configured timeout (00:10:00). The current negotiation leg is 1 (00:10:00). ; System.TimeoutException: The request channel timed out while waiting for a reply after 00:10:00. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.; System.TimeoutException: The HTTP request to 'webservice-address' has exceeded the allotted timeout of 00:10:00. The time allotted to this operation may have been a portion of a longer timeout. ; System.Net.WebException: The operation has timed out
回答1:
What is probably happening is that your Biztalk server is overloading your downstream WCF service with too many concurrent calls.
Your WCF service will only accept a finite number of concurrent connections depending on the processing capability of the WCF service (e.g. number of servers, number of threads in the app pools etc).
Quick and Dirty, but not recommended There are knobs on the BizTalk WCF adapter to reduce the number of concurrent messages on the send ports. If your orchestrations are triggered by batches of incoming messages then you can also look at adjusting the receive adapters and also the BizTalk throttling settings on your receive host, in order to reduce the amount of messages absorbed.
Singletons The recommended approach however is to modify your orchestration to become a singleton, or Seroter's 'N-ton' so that it limits the number of concurrent messages that it processes (typically by correlating messages so that they stack up in the message box).
You could also look improving the performance of the WCF service - e.g. look at indexing if it uses a database, caching if it fetches data etc.
回答2:
Another couple of options...
Set Ordered Delivery on the physical send port. This will impact performance, as the messages will be effectively serialized, but is really quick to test and may/may not turn out to be suitable in your situation...
Set Delivery Notification Transmitted on the logical send port and catch DeliveryFailureException. Then you can wait a predefined/configurable amount of time and retry the orchestration. This is a bit more involved, but gives you the most flexibility.
Good luck!
来源:https://stackoverflow.com/questions/9531690/biztalk-wcf-integration-issue