Hi,
I am getting dead locks when i am receiving flat file messages in to the orchestration.
i have one orchestration to receive flat file messages as xml document.
in side the orchestaion i am calling a helper class to parse this XLANGMessage and convert it to xml document.
then i am calling web service to update sql server.
during testing it is putting most of the messages in suspended queue with following dead lock error.
i tried just 10 messages.it is putting 9 messages in suspended queue.
i have one more orchestration receiving flat file and calling same webservice to update sql database.
This one is using flat file disassembler to convert flat file.
both are using same webservice to update sql server.
initially i created seperate solution for these two.Both were working fine when i deploy only one.
but if start both at the same time.Both are failing.
Please help me out.
Errors From event log:
1)
The following stored procedure call failed: " { call [dbo].[bts_UpdateMsgbox_BizTalkServerApplication]( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}". SQL Server returned error string: "Transaction (Process ID 72) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".
2)
An unrecoverable exception (see the 'inner exception' below) has occurred.
Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ScheduleComplete(Boolean terminate)
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.ScheduleComplete(Context ctx, Boolean finalPersisting, Boolean terminate)
at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
at Microsoft.XLANGs.Core.TransactionalContext.OnCommit()
at Microsoft.XLANGs.Core.LongRunningTransaction.OnCommit()
at OrchProcessFlightTimes.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
A batch item failed persistence Item-ID a9cacb88-14e0-4bab-934d-f5e43893e273 OperationType MAIO_CommitBatch Status -1061151942 ErrorInfo A database failure occurred due to a deadlock. .
Exception type: PersistenceItemException
Not sure on this one. Have you tried to put the code into two separate Application in separate hosts?
It sounds like something MS Support might be able to help with.
Stephen W. Thomas http://www.BizTalkGurus.com
I would look first to the state of the sql server running the bts management dbs. Enough room, db and indexes in good shape? etc. Then I would look to the throttling parameters. I believe your sql engine is under powered, or overly constrained in some way.
try simplifying the system to find the bottle neck. Is the ws that handles the sql inserts handling its deadlocks appropriately? can you convert to use bts sql adapter to test?