view connection pool/open or used connections?

D

DraguVaso

Hi,

I had an error concerning the connection-pool: "Timeout expired. The
timeout period elapsed prior to obtaining a connection from the pool. This
may have occurred because all pooled connections were in use and max pool
size was reached." (in VB.NET).

I was already able to solve the problem, because I didn't know before I have
to close the SqlDataReader also.

But I saw in some forums terms like 'the performance monitor' whcih can be
used to see the connection pool or the connections that are used.
Unfortunately I wasn't able to find this 'monitor'. Can anybody tell me
where to find it or something liek that? so I will be able to see if I'm
using too many connections or having still some connections open.

I'm using VB.NET (2003), with an MSDE database and Sql Server.

Thanks in advance,

Pieter
 
M

Miha Markic

Hi,

You might check them using Enterprise Manager (Management/Current
Activity) or using a stored procedure sp_who.
 
R

Rubens Naves

Pieter,

We are having a really big problem with TIMEOUTS after we migrate to windows
2003 (SQL / APP Server).

We are using VBNET to build serviced components...

How did you solve your problems ?

Thanks
 
D

DraguVaso

Thank you very much!!!

Miha Markic said:
Hi,

You might check them using Enterprise Manager (Management/Current
Activity) or using a stored procedure sp_who.
 
D

DraguVaso

Hi!

I read on some newsgroups that people wereh aving the same problems while
migrating.

I don't know if the things that caused the problem in my application arethe
same as yours: What happend was: I used some SqlDataReaders, but I didn't
know that every datareader has to be closes explicit, just liek your
connections.
So everytime you used a DataReader be sure you close it:
MyDataReader.Close
MyDataReader = Nothing

Same thing with the connections:
If MyConnection.state = connectionstate.open Then
MyConnection.close
End if
MyConnection = nothing

And I guess you better do the same thing wth commands:
MyCommand.close
MyCommand = nothing

That solved my problem, I hope it helps you too?

Pieter
 
E

Erland Sommarskog

Rubens said:
We are having a really big problem with TIMEOUTS after we migrate to
windows 2003 (SQL / APP Server).

We are using VBNET to build serviced components...

So what sort of timeouts are you getting? Dragu was having problems with
the connection pool, which I believe is due to careless handling of
the connections on the client side. (But ADO .Net is not my area.)

If you get command timeouts, this is because ADO .Net, as all other client
libraries except DB-Library, has a default timeout of 30 seconds. The
simple remedy is to set the timeout to 0, which means no timeout. However,
you may of course still experience that your queries are slow.
 
H

Hermit Dave

above all that if you need to use a monitor to view asp.net related counters

Start >> Run >> PerfMon
Add a few counters... (you have some 50 odd related to asp.net)

and keep it running...

hope this helps,

HD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top