0
Answered

sapConnector timing out in 64bit mode

Monash 9 years ago in UNIFYBroker/SAP ERP Human Capital Management updated by anonymous 9 years ago 14

Trying to do a full import on multiple SAP connectors in 64bit mode..

Change detection engine import all items for connector sapOrgUnit failed with reason The request channel timed out while waiting for a reply after 00:00:59.9960936. 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.. Duration: 00:01:00.1614898

Unify.Service.Connect.exe.config

It might need updated timeout values on the client (e.g. here). For this particular error a larger receiveTimeout should do it. If that still doesn't do it and it's caused by requests queuing up, I'll take another look at the service (there's already the code to allow multiple requests at once, but it might not be working as advertised).

Did the change but still failing with the 1 minute timeout

      <basicHttpBinding>
        <binding name="StreamingFileTransferServicesBinding" transferMode="StreamedResponse" maxBufferSize="65536" maxReceivedMessageSize="204003200" sendTimeout="10:00:00" >
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        </binding>
		<binding name="basicHttp" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000" receiveTimeout="00:10:00">
          <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>
        </binding>
      </basicHttpBinding>

Huu Tran, which binding is the SAP service using? The wrong one may have been updated.

Monash, is the error message identical to the original one? Sometimes these messages have very subtle differences. Thanks.

Hi Adam

Attached the Unify.Service.Connect.exe file and also this is the error message atm

Change detection engine import all items for connector sapOrgUnit started.",Normal
20150823,22:07:53,UNIFY Identity Broker,Change detection engine,Error,"Change detection engine import all items failed.
Change detection engine import all items for connector sapOrgUnit failed with reason The request channel timed out while waiting for a reply after 00:00:59.9990235. 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.. Duration: 00:01:00.0342435
Error details:
System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:59.9990235. 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 'http://localhost:6000/RemoteSapService.svc' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   --- End of inner exception stack trace ---
   at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   --- End of inner exception stack trace ---
Server stack trace: 
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
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 Unify.Product.IdentityBroker.IRemoteSAPService.GetOrgStructureDetails(ConnectionSettings connectionSettings, SapHrOrgStructureRequestInfo orgStructureInfo)
   at Unify.Product.IdentityBroker.SapHrRemoteCommunicator.<>c__DisplayClass12.<GetOrgStructureDetails>b__f(IRemoteSAPService service)
   at Unify.Product.IdentityBroker.SapHrRemoteCommunicator.GetOrgStructureDetails(ISapHrOrgStructureRequestInfo orgStructureInfo)
   at Unify.Product.IdentityBroker.SapLoggingCommunicatorDecorator.GetOrgStructureDetails(ISapHrOrgStructureRequestInfo orgStructureInfo)
   at Unify.Product.IdentityBroker.SapHrOrganisationStructureConnector.RetrieveAllEntities()
   at Unify.Product.IdentityBroker.ConnectorToReadingConnectorBridge.GetAllEntities(IStoredValueCollection storedValueState)
   at Unify.Product.IdentityBroker.EventNotifierReadingConnectorDecoratorBase`1.GetAllEntities(IStoredValueCollection storedValues)
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
   at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
   at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass29.<Run>b__27()
   at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal

Something interesting

Currently I am (afaik) seeing it fail for only one connector sapOrgUnit. But the same connector is working on other server connecting to the same data source (QAT SAP)

On our working server for the connector here is the stat for full import

Total Entities: 660 
Started:  24/Aug/2015 08:24:27  
Completed: 24/Aug/2015 08:26:23 
Duration:  00:01:56.3147332 

Adam van Vliet: it is using

<binding name="basicHttp" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferSize="20000000" maxBufferPoolSize="20000000" receiveTimeout="00:10:00">          <readerQuotas maxDepth="32" maxArrayLength="200000000" maxStringContentLength="200000000"/>

We may have increase the timeout on Web Service call to SAP ...

Hi Huu Tran, that's why I did it in WCF, so that it's completely configurable.

Hi Adam

Another error in sapPerson now

Import all entities from connector sapPerson failed with reason The maximum message size quota for incoming messages (20000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.. Duration: 00:01:22.8003645
Error details:
System.ServiceModel.CommunicationException: The maximum message size quota for incoming messages (20000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element. ---> System.ServiceModel.QuotaExceededException: The maximum message size quota for incoming messages (20000000) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
   --- End of inner exception stack trace ---
Server stack trace: 
   at System.ServiceModel.Channels.HttpInput.ThrowMaxReceivedMessageSizeExceeded()
   at System.ServiceModel.Channels.HttpInput.ReadBufferedMessage(Stream inputStream)
   at System.ServiceModel.Channels.HttpInput.ParseIncomingMessage(HttpRequestMessage httpRequestMessage, Exception& requestException)
   at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
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 Unify.Product.IdentityBroker.IRemoteSAPService.GetEmployees(ConnectionSettings connectionSettings, String statusType, DateTime startDate, DateTime endDate, String infoType, String[] subTypes, String[] employeeIdRecords)
   at Unify.Product.IdentityBroker.SapHrRemoteCommunicator.<>c__DisplayClass6.<GetEmployees>b__3(IRemoteSAPService service)
   at Unify.Product.IdentityBroker.SapHrRemoteCommunicator.GetEmployees(String statusType, DateTime startDate, DateTime endDate, String infoType, IEnumerable`1 subTypes, IEnumerable`1 employeeIdRecords)
   at Unify.Product.IdentityBroker.SapLoggingCommunicatorDecorator.GetEmployees(String statusType, DateTime startDate, DateTime endDate, String infoType, IEnumerable`1 subTypes, IEnumerable`1 employeeIdRecords)
   at Unify.Product.IdentityBroker.SapHrEmployeeConnector.<ProcessGetEntities>d__1e.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Unify.Framework.Collections.ActionOnExceptionEnumerator`1.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.<ActionOnLast>d__19`1.MoveNext()
   at Unify.Framework.Collections.EnumerableExtensions.<ProduceAutoPages>d__a`1.MoveNext()
   at Unify.Framework.Visitor.ThreadsafeVisitorEvaluator`1.Visit()
   at Unify.Product.IdentityBroker.RepositoryChangeDetectionWorkerBase.PerformChangeDetection(IEnumerable`1 connectorEntities)
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.ImportAllChangeProcess()
   at Unify.Product.IdentityBroker.ChangeDetectionImportAllJob.RunBase()
   at Unify.Framework.DefinedScopeJobAuditTrailJobDecorator.Run()
   at Unify.Product.IdentityBroker.ConnectorJobExecutor.<>c__DisplayClass29.<Run>b__27()
   at Unify.Framework.AsynchronousJobExecutor.PerformJobCallback(Object state)",Normal

Hi Piyush,

Please change MaxReceivedMessageSize in the httpBasic binding accordingly and try it again.

Thanks,
Huu

Hi Huu

Changed maxReceivedMessageSize="20000000000"

But got the error

Change detection engine import all items for connector sapPerson failed with reason This factory buffers messages, so the message sizes must be in the range of an integer value.

What's the max value we should put ?

I believe it is 2,147,483,647 so pls put in 2,000,000,000

Hi Piyush,

Can you pls put the settings as below and try for both issues.

      <basicHttpBinding>        
<binding name="StreamingFileTransferServicesBinding" transferMode="StreamedResponse" maxBufferSize="65536" maxReceivedMessageSize="204003200" sendTimeout="10:00:00" >          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />        
</binding>		
<binding name="basicHttp" allowCookies="true" maxReceivedMessageSize="204003200" maxBufferSize="204003200" maxBufferPoolSize="204003200" receiveTimeout="00:10:00" sendTimeout="10:00:00">          <readerQuotas maxDepth="2147483647" maxArrayLength="16384" maxStringContentLength="2147483647"/>        
</binding>      
</basicHttpBinding>

Hi Huu

Yes that seems to have resolved the import issue..

but seeing performance degradation - not sure atm

might raise that separately once we get a bit more idea..

Please close this ticket and update the doc with the recommended settings.