none
Blocking in BizTalkMsgBoxDb when Using WCF-SQL Typed Polling Receive Location RRS feed

  • Question

  • I am having problems with, what appears to be, blocking in the message box database while a WCF-SQL receive location is receiving messages.

    I have a WCF-SQL receive location that is configured for typed polling. The stored procedure that it uses for the polling operation pulls in 100 records at a time and marks the rows selected as having been pulled. I tweaked the adapter-generated schema to debatch the messages, after which a map is applied at the receive port.

    Lately, I've been seeing the receive location stall (or disable itself if configured to do so) when there is moderate load. Along with this, I'm seeing the following event log entries:


    Event Type:	Error
    Event Source:	BizTalk Server 2009
    Event Category:	BizTalk Server 2009 
    Event ID:	6912
    Date:		12/13/2010
    Time:		4:00:56 PM
    User:		N/A
    Computer:	FEN******74
    Description:
    The following stored procedure call failed: " { call [dbo].[bts_InsertMessage]( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}". SQL Server returned error string: "The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.".
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    Event Type:	Error
    Event Source:	BizTalk Server 2009
    Event Category:	BizTalk Server 2009 
    Event ID:	6912
    Date:		12/13/2010
    Time:		4:00:56 PM
    User:		N/A
    Computer:	FEN******74
    Description:
    The following stored procedure call failed: " { call [dbo].[bts_InsertTrackingData]( ?, ?, ?, ?, ?, ?, ?, ?, ?)}". SQL Server returned error string: "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    Event Type:	Warning
    Event Source:	BAM EventBus Service
    Event Category:	None
    Event ID:	2
    Date:		12/13/2010
    Time:		4:02:03 PM
    User:		N/A
    Computer:	FEN******74
    Description:
    Reading error. Exception information: TDDS failed to read from source database. SQLServer: fensqlmrp610m\mrp610m, Database: BizTalkMsgBoxDb.Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.. 
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    Event Type:	Warning
    Event Source:	BizTalk Server 2009
    Event Category:	BizTalk Server 2009 
    Event ID:	5740
    Date:		12/13/2010
    Time:		4:00:56 PM
    User:		N/A
    Computer:	FEN******74
    Description:
    The adapter "WCF-SQL" raised an error message. Details "System.Transactions.TransactionException: The operation is not valid for the state of the transaction. ---> System.TimeoutException: Transaction Timeout
     --- End of inner exception stack trace ---
     at System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction)
     at System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions)
     at Microsoft.BizTalk.Adapter.Wcf.Runtime.TxnBatch2..ctor(IBTTransportProxy transportProxy, ControlledTermination control, Transaction transaction, ManualResetEvent orderedEvent, Boolean makeSuccessCall)
     at Microsoft.BizTalk.Adapter.Wcf.Runtime.AbortOnFailureReceiveTxnBatch2..ctor(IBTTransportProxy transportProxy, ControlledTermination control, Transaction transaction, ManualResetEvent orderedEvent, TxnAborted txnAborted)
     at Microsoft.BizTalk.Adapter.Wcf.Runtime.SingleMessageReceiveTxnBatch2.StartProcessFailures()".
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    Event Type:	Warning
    Event Source:	BizTalk Server 2009
    Event Category:	BizTalk Server 2009 
    Event ID:	5740
    Date:		12/13/2010
    Time:		4:00:56 PM
    User:		N/A
    Computer:	FEN******74
    Description:
    The adapter "WCF-SQL" raised an error message. Details "System.ObjectDisposedException: Cannot access a disposed object.
    Object name: 'TransactionScope'.
     at System.Transactions.TransactionScope.Complete()
     at System.ServiceModel.Dispatcher.TransactionRpcFacet.ThreadLeave()
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(MessageRpc& rpc)
     at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)".
    
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    

    To me, it looks like the message insertion (bts_InsertMessage and bts_InsertTrackingData) are being blocked, or deadlocked, by the tracking host.

    Has anyone else seen this, and if so, what have you been able to do about it?

    Thanks,
    Dave


    Tuesday, December 14, 2010 1:43 PM

Answers

  • Hi Dave,

    Perhaps you have to apply a couple of hotfixes for BizTalk 2009 or SQL Server 200x. See this post on cumulative updates. Another option is using DTCPing/Tester and see if there any abnormalities, investigate traffic to from SQL Server (i.e. latency), check MSDTC settings (see my post on MSTDC and BizTalk) and/or use SQL profiler.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Wednesday, December 15, 2010 1:15 PM
    Moderator
  • Hi Dave,

    Apply the latest service pack of WCF SQL Adapter. WCF SQL Adapter has an issue which quickly increases the thread count even though there are not record to be processed and causes timeout issues.

    Please see the support KB and check if this is applicable for you.
    http://support.microsoft.com/kb/2300507

    Regards
    Smithesh

     

     

    Tuesday, December 21, 2010 2:30 AM

All replies

  • Hi Dave,

    Perhaps you have to apply a couple of hotfixes for BizTalk 2009 or SQL Server 200x. See this post on cumulative updates. Another option is using DTCPing/Tester and see if there any abnormalities, investigate traffic to from SQL Server (i.e. latency), check MSDTC settings (see my post on MSTDC and BizTalk) and/or use SQL profiler.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Wednesday, December 15, 2010 1:15 PM
    Moderator
  • Steef-Jan,

    I'll check these out with the infrastructure guys on Monday and let you know how it goes.

    Thanks,

    Dave

    Saturday, December 18, 2010 2:16 PM
  • Hi Dave,

    Apply the latest service pack of WCF SQL Adapter. WCF SQL Adapter has an issue which quickly increases the thread count even though there are not record to be processed and causes timeout issues.

    Please see the support KB and check if this is applicable for you.
    http://support.microsoft.com/kb/2300507

    Regards
    Smithesh

     

     

    Tuesday, December 21, 2010 2:30 AM
  • I am exactly getting same warnings for 30 mins. I installed CU2 for biztalk adapter pack 2010 and rebooted the machine. But still the problem exist. please suggest
    Wednesday, June 27, 2012 10:34 AM