June 9, 2010 at 7:56 am
In my asp.net app, I use ado.net and store procedures. Last night about 10 pm,
I ran app and then ran sp_who2. I found that there are so many SPID were
generate. Is it some problem in my app?
Status:sleeping
login: sa
hostname: intranet1
dbname: live
command:AWAITING COMMAND
programname: .Net SqlClient Data Provider
SPID CPUTime DiskIO LastBatch
58 0 0 06/08/2010 22:44
60 0 0 06/08/2010 22:44
62 0 1 06/08/2010 22:44
63 0 0 06/08/2010 22:44
64 47 37 06/08/2010 22:48
69 15 0 06/08/2010 22:48
70 0 2 06/08/2010 22:48
71 0 0 06/08/2010 22:48
57 0 0 06/08/2010 22:49
59 0 0 06/08/2010 22:49
68 0 0 06/08/2010 22:49
72 32 40 06/08/2010 22:49
73 0 14 06/08/2010 22:50
77 0 0 06/08/2010 22:50
78 0 0 06/08/2010 22:50
79 0 0 06/08/2010 22:50
80 0 5 06/08/2010 22:51
81 0 0 06/08/2010 22:51
82 15 1 06/08/2010 22:51
83 0 0 06/08/2010 22:51
84 0 0 06/08/2010 22:51
85 0 0 06/08/2010 22:51
86 0 6 06/08/2010 22:51
87 0 0 06/08/2010 22:51
88 0 0 06/08/2010 22:51
89 0 0 06/08/2010 22:51
74 15 0 06/08/2010 22:52
90 16 4 06/08/2010 22:52
91 0 0 06/08/2010 22:52
92 0 0 06/08/2010 22:52
61 0 0 06/08/2010 22:55
93 0 5 06/08/2010 22:55
65 0 9 06/08/2010 22:57
75 0 0 06/08/2010 22:57
76 0 0 06/08/2010 22:57
94 0 0 06/08/2010 22:57
66 0 0 06/08/2010 23:00
67 0 0 06/08/2010 23:00
95 16 15 06/08/2010 23:00
June 9, 2010 at 2:19 pm
In asp.net you should be issuing a connection close for each time you have a connection open. The .net framework manages the connection pooling for you, but I'm pretty sure you should not be seeing what you're seeing with multiple SPIDs from the same second in time. To me, it looks like there are a bunch of connections.opens without the corresponding connection.closes.
June 9, 2010 at 2:29 pm
I'd agree with BT. If you're not explicitly closing connections, and maybe don't have connection pooling, you could get this behavior.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply