Yesterday a question was posted in MSDN-BizTalk forum about the following error:
Event Type: Error
Event ID: 5754
A message sent to adapter “HTTP” on send port “<SendPortName>” with URI “<URL>” is suspended.
Error details: The HTTP send adapter cannot complete the transmission within the specified time.
The questioner was using a ONE-WAY send port with HTTP adapter and when he sent a message to a destination URL, after a few minutes he got this error. When I searched about this error, all the blogs were referring as this error would occur in Solicit-response port (two-way send port) with HTTP adapter. But this could also occur in one-way send ports which use the HTTP adapter.
This error is due to HTTP send adapter timing out. It’s not specific to two-way or one-way port configuration. So in the case of two-way port, this error occurs when you don’t get the response within the specified time. And in the case of one-way send port, this error occurs when you don’t get the response/handshake for the message/request you sent.
HTTP send adapter sends the message to a destination URL on an HTTP POST (BizTalk uses POST not GET). For HTTP post to get HTTP-200 status (success status) there will be a response (even you have used one-way, this is HTTP handshake) which will contain an entity describing or containing the result of the action. So in this case, this response/handshake seems to take longer time to come.
This error would not happen for all the messages sent, generally this occurs when a large message is being sent. Or during a peak period when you send many messages at the same time.
We have two options to handle this issue:
Setting “Request timeout” property:
You can increase the time out setting for HTTP sent adapter by setting the “Request timeout” property. The default value for this property is zero (0). If it’s set to zero or left empty, BizTalk Messaging Engine calculates the time-out based on the request message size. Its uses this formula:
Timeout = Min((180sec + ((MessageSize* 3)/1000)), 3600sec) or 180 sec + 3sec/1000bytes up to a maximum of 1 hour.
If this is too complex for you to calculate the time out for your case, then if you can use a tool like Fiddler or any network sniffer tool, it would easily tell you the overall elapsed time for a particular request to complete. This would give some idea to assign maximum timeout period.
You can increase the time out setting for HTTP sent adapter at host level. Meaning, this setting would affect all the send port’s HTTP adapters running under a particular host.
In BizTalk administrator console, go to “Platform Settings” –> “Adapters” –> select “HTTP” –> In the host pane at right, select the appropriate “send” host –> right click for properties –> in “HTTP-Adapter handler properties” –> click on properties –> in “HTTP Transport Properties” set the appropriate value in seconds to “Request timeout”
Or if you just want to set the Request timeout for a particular send port, do you can do so in HTTP Transport Properties.
HTTP Adapter Configuration tuning:
Refer this article from MSDN: HTTP Adapter Configuration and Tuning Parameters
By tuning parameters/configurations of HTTP adapter through registry key entries and through the modification of the BTSNTSvc.exe.config you can resolve this issue. But this solution would affect all the adapter instances in that specific host.
If your issue of HTTP send adapter time out is due to large message being sent, then you can handle it by increasing the value for “HttpOutTimeoutInterval” in registry level. Or is your issue is due to many messages being sent at the same time, then increasing the “HttpOutInflightSize”’s maxconnection value. This would increase the maximum number of concurrent HTTP requests that BizTalk Server HTTP send adapter instance will handle. Refer to the above article from MSDN for detailed information.