Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The query processor could not start the necessary thread resources for parallel query execution

What does this mean and how to solve.

I am running multi threaded c# application and this error happens when accessing database.

The query processor could not start the necessary thread resources for parallel query execution.

I am using "using statements" at every query so i suppose connections are getting disposed of after used.

How can i monitor what is causing this ? This is starting happening after some time like at least after 1 hour.

Windows 7 64 bit sp1 16 gb ram visual studio 2010 mssql 2008 r2 core i7 2600 @ 4.5 ghz

like image 599
MonsterMMORPG Avatar asked Oct 17 '11 03:10

MonsterMMORPG


2 Answers

The problem indicates that your SQL server threads are already busy and unable to allocate any other threads to handle your request. You can also try to enable MARS (Multiple Active Result Sets) option in the connection string by setting it "MultipleActiveResultSets=true" if you're executing multiple batches.

like image 158
Unavailable Avatar answered Oct 01 '22 07:10

Unavailable


There is a much better answer with more discussion and details over at dba.stackexchange.com.

https://dba.stackexchange.com/questions/47237/need-to-understand-parallel-query-execution-error

like image 32
Adrian Carr Avatar answered Oct 01 '22 06:10

Adrian Carr