>>The thread creates the response, and passes that back to the Server thread for passing to the client. So the thread will complete even if the client has disconnected.
My dangling reference is the case where the timeout is -1, the thread/connection to SQL would persist until the blocking is resolved, or the connection is killed. The SQL connection that is BLOCKED - remains, um, dangling!? "Sleeping Connections" are fine, But ones that are BLOCKED and persist for any length of time can create a scenario for continued degradation. In these scenarios the users (or the Browser) will give up, or try again...
MS says "At the beginning of a connection, this setting has a value of -1. After it is changed, the new setting stays in effect for the remainder of the connection." My experience is mainly with NT4 and in practise I set the timeout in two places either when i make my initial connection or sometimes within a stored procedure.
IN NT7 IO statements are preceeded explicitly with a LOCK_timeout, So you address the main issue, but you ALSO EXPLICITLY Set it after your IO to the default(-1) not The Setting that existed before you changed it. Nothing wrong with that so long as one understands the impact. To me this overrides the implied behaviour from MS as now "ALL IO statements must EXPLICITLY set the TIMEOUT, because NETTALK is always resetting the behaviour for the connection", but not for a good reason (to me) because all Nettalk generated IO EXPLICITLY SET a good timeout anyway. (not necessarily true for any other code)
I guess a CAVEAT in the DOCS that all hand code and non-nettalk MSSQL I-O should explicitly set the lock_timeout, would suffice.
In my mind, By default, threads that quietly die are better than threads that quietly live a long life, contributing to the additional Blocking. Hence i believe -1 is the least desireable default behaviour, it should be left at what was last intended. (in nettalks defence for some reason it intends -1 <g>)
KEVIN, the basic BLOCK behavior can be tested using Query analzyer, BEGIN a TRANSACTION, select/update a resources with LOCK, test your app accessing that resource. (ROLLBACK when done). SQL Profiler is handy, it will clearly show each time the SET LOCk_TIMEOUT setting.