Hi, I'm having a few issued with deadlocks that seem to eventually cause Zombied connections. I'm using NH 2.1.2GA and SQL Server 2005.
My scenario is thus: I have a multi-threaded process that scans a database table and creates a bunch of inserts. All inserts are logicially distinct sets of data, therefore is is no chance of data collisions. I am running about 50 threads each hitting the DB at the same time. Performance is pretty good. I use HiLo within NH to get key values. Intermittently I'll hit a deadlock on the HiLo. I don't mind this, it's to be expected with the load I'm putting through. I cope with the deadlock by catching it, disposing the session (using the NH dispose method) then opening a new session and try again. This works fine. Then after a deadlock (but not always) I'll get an "error performing isolated" work NH exception. The exception trace points this to the SQL Server connection has been zombied (i.e. "This SqlTransaction has completed; it is no longer usable"). I think I understand why this is happening - the deadlock is causing the SQL connection is to become unstable and I'm now explictly dealing with the Zombie in code, but apart from just handling it is there anything different I should be doing, short of avoiding the deadlock in the first place? Thanks. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
