Hi Otis,
Here's my reasoning: (I'm refering to processes as seen in SQL Serv 2008 r2 Activity Manager, when i say 'connections')
-- Queries had begun timing-out, freezing.
-- Never happened before, but a lot of new work had been done (I'd began persisting the entities in memory. (They persist for approximately 3 minutes, depending on usage))
-- Server running tons off Linq LLBLGEN stuff, had 10-15 connections open, runs fine.
-- Devt box showed 100+ connections with this new model. I was watching them open fast as my code began running, when they hit the 100 mark - the system froze and those time-out errors appeared. It confirmed that something was clogging the whole thing up.
-- The system will freeze at around 100 open connections, at that point i can either wait a long time for them to clear or recycle the pool (this is what made me think something odd was afoot)
-- I inspected the queries that Management studio showed as 'last query' - they were three or for relatively harmless queries.. I think along the lines of: (can't be sure as I can only see projected SQL code, but 90% sure)
var x = new linqmetadata().entity.where(x=>x...).ToList();
-- I tested this query on a simple page, refreshing the page over and over. The connections began to stack up.. Wrapped the query inside a for loop with 1000s iterations. Bang, it froze.
-- I wrapped the linq calls in a transaction and the whole problem went away. The 1000 iteration loops worked, as did the entire system.
I've never seen this before, I tried updating to the lastest libs, same issue.. One thing, I'm dealing with a LOT of data in a complex upgrade / update cycle.. the code sets unusually high demand on the llblgen libraries. Perhaps this issue only shows when literally thousands of queries are thrown out a second, though.. that doesn't explain why they persist for ages after, or until i recycle the .net pool, or that 1000 loop.
Cheers in advance,
Frank.