Sunday, February 26, 2012

Error : "Parallel worker query thread was involved in a deadlock" in SQL Se

We are running four session of application and each session is running
the same stored procedure against SQL Server database running SP3
patch.
All these four session are doing data intense operation and after some
time three of the process are getting completed correctly and the
fourth give us an DeadLock error message.
The error message which is displayed in the application is normal SQL
Server deadlock message.
But in the profiler we are seeing the below mentioned error message
//
Lock : Deadlock Chain : Parallel worker query thread was involved in a
deadlock" in profiler
//
We know that this error is cause by SQL Server optimization
methodology, we know it has to do with
parallel threads deadlocking each other.
Now we are looking for any documentation or information from the
Microsoft about this, any info will be appreciated.
Regards
Basharat<basharatw@.hotmail.com> wrote in message
news:1115667066.094653.87860@.f14g2000cwb.googlegroups.com...
> We are running four session of application and each session is running
> the same stored procedure against SQL Server database running SP3
> patch.
> All these four session are doing data intense operation and after some
> time three of the process are getting completed correctly and the
> fourth give us an DeadLock error message.
> The error message which is displayed in the application is normal SQL
> Server deadlock message.
> But in the profiler we are seeing the below mentioned error message
> //
> Lock : Deadlock Chain : Parallel worker query thread was involved in a
> deadlock" in profiler
> //
> We know that this error is cause by SQL Server optimization
> methodology, we know it has to do with
> parallel threads deadlocking each other.
> Now we are looking for any documentation or information from the
> Microsoft about this, any info will be appreciated.
> Regards
> Basharat
>
Take a look at the "max degree of parallelism" and "maxdop" query hints in
the books online.
I don't know if it will help in this situation or not.
Rick Sawtell
MCT, MCSD, MCDBA|||> We are running four session of application and each session is running
> the same stored procedure against SQL Server database running SP3
> patch.
> All these four session are doing data intense operation and after some
> time three of the process are getting completed correctly and the
> fourth give us an DeadLock error message.
> The error message which is displayed in the application is normal SQL
> Server deadlock message.
> But in the profiler we are seeing the below mentioned error message
> //
> Lock : Deadlock Chain : Parallel worker query thread was involved in a
> deadlock" in profiler
> //
> We know that this error is cause by SQL Server optimization
> methodology, we know it has to do with
> parallel threads deadlocking each other.
That sounds exactly l ike the problem I was having about two months ago on a
2-cpu server.
There is a MAXDOP option you can specify to set the "maximum degree of
parallelism" on a given SQL statement. I can't remember the sp that we had
to tweak that way, and I couldn't find it in the help index. I believe I
found it by dowing a full text search of BOL. For us, the solution was to
provide the MAXDOP hint and set it to 1 (I think).
If you can get to a source with more than a 3 month history of this NG, you
could search for posts containing MAXDOP from a thread that I started
between 2 & three months ago.
Perhaps someone else can chime in with something more precise.
Peace & happy computing,
Mike Labosh, MCSD
"Escriba coda ergo sum." -- vbSensei
<basharatw@.hotmail.com> wrote in message
news:1115667066.094653.87860@.f14g2000cwb.googlegroups.com...
> Now we are looking for any documentation or information from the
> Microsoft about this, any info will be appreciated.
> Regards
> Basharat
>

No comments:

Post a Comment