none
SAP Adapter send error RRS feed

  • Question

  • Hello

     

    We sometimes receive an error when sending large number (> 15,000) of IDOCs via SAP adapter:

     

    The adapter failed to transmit message going to send port "SAP" with URL "sap://Client=700;lang=EN;@A/172.20.48.28/00?ListenerGwHost=172.20.48.28&ListenerGwServ=SAPGW00&ListenerProgramId=BIZTALKPROD". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.TimeoutException: The timeout expired while trying to get a connection

    Server stack trace:
       at Microsoft.ServiceModel.Channels.Common.Design.AdapterExceptions.ThrowTimeoutException(String exceptionMessage, Object source)
       at Microsoft.ServiceModel.Channels.Common.Design.TimeoutHelper.ThrowIfTimeoutExpired(String exceptionMessage, Object source)
       at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnection(Guid clientId, TimeSpan timeout)
       at Microsoft.ServiceModel.Channels.Common.Design.ConnectionPool.GetConnectionHandler[TConnectionHandler](Guid clientId, TimeSpan timeout, MetadataLookup metadataLookup, String& connectionId)
       at Microsoft.ServiceModel.Channels.Common.Channels.AdapterRequestChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open()

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.ICommunicationObject.Open()
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)".

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

    My question is what is the best way avoid this error or at least decrease it's probability?

     

    Regards,

    Raicho

    Tuesday, August 26, 2008 12:17 PM

Answers

  • (a) You could try increasing the OpenTimeout and SendTimeout binding properties.

    (b) Run the SAP Adapter Ports in their own host, and then configure BizTalk settings to limit the number of messages being processed by the port at any instant of time (the maximum number of messages the adapter can process simultanesously is equal to the MaxConnectionsPerSystem binding property). You could try reducing the "In-Process Messages Per CPU" value for example. More information here - http://msdn.microsoft.com/en-us/library/cc296779.aspx.

    (c) Set the EnableBiztalkCompatibilityMode binding property to true.

    (d) Increase the MaxConnectionsPerSystem binding property. Refer to the documentation if you want to set this value to a number greater than 100.

    Wednesday, August 27, 2008 12:36 AM

All replies

  • (a) You could try increasing the OpenTimeout and SendTimeout binding properties.

    (b) Run the SAP Adapter Ports in their own host, and then configure BizTalk settings to limit the number of messages being processed by the port at any instant of time (the maximum number of messages the adapter can process simultanesously is equal to the MaxConnectionsPerSystem binding property). You could try reducing the "In-Process Messages Per CPU" value for example. More information here - http://msdn.microsoft.com/en-us/library/cc296779.aspx.

    (c) Set the EnableBiztalkCompatibilityMode binding property to true.

    (d) Increase the MaxConnectionsPerSystem binding property. Refer to the documentation if you want to set this value to a number greater than 100.

    Wednesday, August 27, 2008 12:36 AM
  • Hello

     

    I increased OpenTimeout and SendTimeout binding properties but began receiving new error:

     

     

    LayeredOutboundChannel.RequestLayeredChannelBehaviour=NoneDefaultDomainSystem.ArgumentOutOfRangeException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue.
    Parameter name: timeout   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
       at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredOutboundChannel`1.CloseInnerChannel(TimeSpan timeout)
       at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredOutboundChannel`1.AsyncRequest(Object obj)System.ArgumentOutOfRangeException: Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue.
    Parameter name: timeout
       at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
       at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredOutboundChannel`1.CloseInnerChannel(TimeSpan timeout)
       at Microsoft.Adapters.Internal.LayeredChannelBindingElement.LayeredOutboundChannel`1.AsyncRequest(Object obj)

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

     

    Can you help me to prevent this error?

     

    Regards,

    Raicho

     

     

    Friday, August 29, 2008 7:45 AM
  • What are the values of the timeouts currently? (Open/Close/Send/Receive)?

     

    Friday, August 29, 2008 8:19 AM
  •  

    Open  00:05:00

    Close 00:01:00

    Receive 23:00:00

    Send 00:05:00

    Friday, August 29, 2008 8:24 AM
  • How long does the processing of each IDoc take? Can you increase the SendTimeout to say, 1 hour and see if it solves the issue?

    This is what I assume happens - since you are sending 15,000 IDocs, a large number of these reach the adapter (let's say, 500) at a time. Assume the MaxConnections setting is just 50, which means, only 50 can be processed at a time, and the other 450 remain in the adapter queue. Once 50 are processed, the next 50 come along, and so on. Now, the timer started the moment these were put in the queue, and hence, by the time these actually got a chance to get processed, their timer had timed out. Increasing the SendTimeout might alleviate this issue.

    Friday, August 29, 2008 8:32 AM
  • Hi Raicho/Mustansir

    I am getting the same error. what resolved this issue if you still remember. I know its a old tread. But it would be a great help

    you can help on this. In my case the error we are receiving is

    System.ArgumentOutOfRangeException: Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue.
    Parameter name: timeout

    Server stack trace:
       at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)

    This is coming for Dynamic Solicit-Response sendport in Biztalk

    We havent set the timeout explicitly. So I guess the send timeout is dafault value of 1 min.

    But I think the timeout would be sufficient as we are not expecting huge data (its around 100 KB)

    Any suggestions?

    Monday, September 24, 2012 7:56 AM
  • I had exactly same error message as Ravish posted. It happened twice recently. The BTS app services even got crashed when it happened.

    Tuesday, October 16, 2012 3:09 PM