Connection pooling problem

G

Guest

Hi all,

I am accessing my database server through stored procedure using Microsoft
Data Access Application Block.
The first time a client connect IIS it creates two connections.
Then, it creates a connection for every new client.

I don't understand why a new connection is created for the new clients. The
connection string is identical and client connects one after the another so
there is no needs for a new connection (no overload).

Any answer ?

Regards,
Aleks
http://www.Dotnet-Project.com
 
C

cecil

Are you using impersonation? Or perhaps forgetting to close the
connection when you are through using it?
Cecil Howell MCSD, MCAD.Net, MCT
 
G

Guest

Cecil : i am not using impersonation and i am closing all connections.

Sahil : I discover this problem because, for debugging purpose, i were
authenticated the user at every request and i get the wellknown Max pooling
errors. It is the authentifcation or a request for the user rights that
create the new connection. That's why i get a new connection only when a new
user connect (and create a new session).

Thank you for the reply.
 
F

Francois

When do you close the connection? Right after you got the data or at some
later stage?

Also I think that pooled connections are not closed when you call
connection.close() they are merely sent back to the pool of available
connections. This is the all point of connection pooling which is to open a
bunch of connections, keep them open and share them between clients. Thus
the number of open would unlikely decrease (except maybe after some internal
time out).

Francois
 
G

Guest

The Ms application block close the connection itself if i give it a closed
connection.
However, i am closing the connection immediately after i used it.

You're right, connections in the pool is allways connected and the framework
should create a new one only if the existing are not useable. They are closed
after a timeout (the value is not documented).
 
W

WJ

Make sure that only one connection string is used from the beginning to the
end. A slight modification of this string will kick off a new thread
eventhough the contents are the same. I have not experienced this at all. My
site is of Form authentication type that uses one integrated connection. The
user is Network Service (I m using windows 2k3 server). Impersonation is
disabled.

John
 
G

Guest

I'm getting a very similar problem with a stored proc call that uses an
output parameter...the connections dont seem to be released back to the pool
so new connections are opened for subsequent requests...meaning the
connection count soon rises (not good as its used by our public
website)...I'm using a shared connection string and am closing the connection
as soon as finished calling the sp

I have similar calls that are pooling ok so am a bit confused...

Neil
 

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