|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SqlDataAdapter.Fill hung, throttles cpu, and never returns?try { c = new SqlConnection("Server=x;Database=y;Integrated Security=SSPI"); SqlCommand cmd = new SqlCommand("sp_helpdb", c); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); ..... } finally { if (null != c) { c.Close(); } } Most of the time this works fine. But right now I do have a "hung" thread that has throttled the CPU, and if I pause it, the CPU returns, I see this stack trace: mscorlib.dll!System.Threading.WaitHandle.WaitAny() system.data.dll!System.Data.SqlClient.ConnectionPool.GetConnection() system.data.dll!System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection() system.data.dll!System.Data.SqlClient.SqlConnection.Open() system.data.dll!System.Data.Common.DbDataAdapter.QuietOpen() system.data.dll!System.Data.Common.DbDataAdapter.FillFromCommand() system.data.dll!System.Data.Common.DbDataAdapter.Fill() system.data.dll!System.Data.Common.DbDataAdapter.Fill() Should retrieving a connection from the pool not give up and time out after 15 seconds? (the default). It has been running all night and is still apparently waiting to retrieve a connection from the pool. The database is fine with no activity, I can run the process a second time and it connects and returns with results fine, but this original process is stuck and has yet to return. Thanks, |
|||||||||||||||||||||||