none
Oracle WCF-LOB, pollingInterval RRS feed

  • Question

  • Hi guys,

    I am using Oracle WCF-LOB adapter for polling Oracle database, pollingInterval is set to 1800 secs (30 mins). The issue is that the adapter kicks in not every 30 mins as I expect, but at random intervals - 1 hour, 5 bours, 1 hour 30 mins, then there may be a couple of 30 mins intervals and so on...
    Did anyone experience such a behavior?

    Thanks a lot!
    Wednesday, November 11, 2009 12:45 AM

Answers

All replies

  • Are you using BizTalk adapter pack 2.0 or 1.0?
    Is the 'job' being performed in the poll very heavy?
    If you are using 2.0, what is your pollDataAvailableStatement?

    Thursday, November 12, 2009 5:20 AM
  • It is 2.0, the polling query is not heavy - it returns about 8000 records from oracle DB, execution time is less than 1 sec.
    pollWhenDataAvailable = false;



    I enabled tracing as explained here http://msdn.microsoft.com/en-us/library/dd788183(BTS.10).aspx, and found the following exception in the log file:

    <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
    <TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier>
    <Description>Throwing an exception.</Description>
    <AppDomain>DefaultDomain</AppDomain>
    <Source>System.ServiceModel.Channels.ServiceChannel/11566915</Source>
    <Exception>
    <ExceptionType>System.ServiceModel.CommunicationObjectAbortedException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.</Message>
    <StackTrace>
    at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
    at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
    at System.ServiceModel.Channels.CommunicationObject.Open()
    at System.ServiceModel.Dispatcher.ChannelHandler.InitializeServiceChannel(ServiceChannel channel)
    at System.ServiceModel.Dispatcher.ChannelHandler.GetSessionChannel(Message message, EndpointDispatcher&amp; endpoint, Boolean&amp; addressMatched)
    at System.ServiceModel.Dispatcher.ChannelHandler.EnsureChannelAndEndpoint(RequestContext request)
    at System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContext(RequestContext request)
    at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
    at System.ServiceModel.Dispatcher.ChannelHandler.TransactedLoop()
    at System.ServiceModel.Dispatcher.ChannelHandler.SyncTransactionalMessagePump()
    at System.ServiceModel.Dispatcher.ChannelHandler.OnStartSyncMessagePump(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.OnSecurityContextCallback(Object o)
    at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
    at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
    at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
    at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
    </StackTrace>
    <ExceptionString>System.ServiceModel.CommunicationObjectAbortedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.</ExceptionString>
    </Exception>
    </TraceRecord>
    </DataItem>
    </TraceData>
    <System.Diagnostics xmlns="http://schemas.microsoft.com/2004/08/System.Diagnostics">
    <LogicalOperationStack></LogicalOperationStack>
    <Timestamp>12233678051792</Timestamp>
    </System.Diagnostics>
    </ApplicationData>
    

    As I mentioned before, adapter polls the database every 30 minutes. In some cases adapter polls DB successfully every 30 mins as expected, then something happens and the adapter doesn't do anything for a few hours, then out of sudden it starts working again. Most supprising thing is that there are no error messages in the EventViewer or BTS Admin console. I discovered that exception only when I enbled tracing for the adapter, so on the surface it looked like the adapter simply "forgot" that it had to poll every 30 minutes.  In fact there was an exception, probably suppresed in the adapter code.

    BTW, for the E-business Oracle adapter there is a property named OracleConnectionConnectionId - it can be used to track event on the server side as explained here. http://msdn.microsoft.com/en-us/library/dd788453(BTS.10).aspx
    Unfortunately this property doesn't exist for the regular Oracle DB, any suggestion how to rule out issues on the Oracle side?


    Thanks!



    Thursday, November 12, 2009 11:29 PM
  • Hi,

    Look at this blog post: http://blogs.msdn.com/adapters/archive/2007/12/21/why-don-t-i-get-exceptions-when-something-unexpected-happens-in-inbound-scenarios-in-sap-adapter.aspx This will tell you why error message are not seen when you do polling.

    What is your pollDataAvailableStatement? - the adapter only executes pollingStatement when pollDataAvailableStatement returns a integer greater than 0

    Friday, November 13, 2009 6:27 AM
  • Thanks, Manas.
    The pollingStatement is "SELECT 1 FROM DUAL", pollWhileDataFound has been set to FALSE, so the adapter has to poll regardless of the pollingStatement at the intervals specified in the pollingInterval property.

    As I said the adapter has to poll every 30 mins, for example at 1:00, 1:30, 2:00, 2:30, 3:00, 3:30 and so on...
    In fact it polls like this: 1:00, 2:00, 2:30, 5:30, 6:00, 10:00 ...
    If you open the trace log, you will see that there were exception at the missed polling points - at 1:30, 3:00, 3:30, 4:00...
    So the adapters  tried to poll, but something happened and it failed. The exception I mentioned in the prev. post did't give me a clue to what's going on and where I should dig deeper. I thought it's Oracle refusing connection or something like this, but as far as I understand it didn;t even reach the Oracle stage, something happened before upon building the WCF channel.
    I would understand if it didn't work at all, but it does work, but intermittenly.

    Thanks !

    Friday, November 13, 2009 4:20 PM
  • Yes - your theory makes sense - the channel is somehow faulted. What is your receiveTimeout? Is it set to a value lower than your pollingInterval?

    Thanks,
    Manas
    • Marked as answer by fly2 Monday, November 16, 2009 9:53 PM
    Sunday, November 15, 2009 5:59 AM
  • This msdn page describes the recommended values: http://msdn.microsoft.com/en-us/library/dd788467(BTS.10).aspx
    • Marked as answer by fly2 Monday, November 16, 2009 9:53 PM
    Sunday, November 15, 2009 6:02 AM
  • Thank you Manas. I overlooked that. I set receiveTimeouty to the recommended value. I will post an update in a few hours.
    Sunday, November 15, 2009 6:29 PM
  • Manas, thank you very much. Setting receiveTimeout to the recommended value solved the problem.
    The only question why this property is not set by default...
    Monday, November 16, 2009 9:53 PM
  • Good to know that the problem went away. Thanks for the feedback - it will definitely be considered appropriately.
    Tuesday, November 17, 2009 7:58 AM