Timeout - max pool size reached

T

tshad

I got the following message on my Sql Server 2000:

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.

I understand what this is when dealing with Web Application. But this
problem is a small program that just opens and closes an sql table. It is
running as a service and not part of a web application.

Why would I get this message?

Thanks,

Tom
 
M

Miha Markic [MVP C#]

Hi,

Probably you are not closing connections and thus they remain in use. At
last there are too much connections in the pool and you can't get/create a
free one.
 
M

Marina Levit [MVP]

For the same exact reason you would in a web application - why would it be
any different?

You have a connection leak, as there is someplace you are not closing
connections once you are done with them.
 
T

tshad

My question is, I thought each web application had it's own pool. We have
3. Doesn't each have it's own pool?

If this is the case, I could run out of connection for Web Application and
still have connections for the other 2. Correct?

Would my service have its own connection pool?

How do you differentiate or set the pool size for each Application?

I know I still need to find out where the connection is coming from.

Would the leak need to be in the Service or would the connection pools of
the other Web Applications be affecting it?

When I do an sp_who I don't seem many connections open (about 15-20
normally).

Thanks,

Tom
 
M

Marina Levit [MVP]

Connection leaks in a web application would not affect a windows service.
The windows service itself is leaking them.
 
T

tshad

Marina Levit said:
Connection leaks in a web application would not affect a windows service.
The windows service itself is leaking them.

But that is my question.

Does a service have connection pools?

As I mention below, this is one of the errors I got (The timeout period
elapsed prior to obtaining a connection from the pool).

This is very confusing.

The code is pretty straight forward.

Thanks,

Tom
 
M

Marina Levit [MVP]

Yes, every application has one. It doesn't matter what type of application.
Not sure why you think a service would be any different.

Again, your service is leaking connections someplace. You should review your
code.
 
T

tshad

Marina Levit said:
Yes, every application has one. It doesn't matter what type of
application. Not sure why you think a service would be any different.

Is the Connection Pool and Connection Pool size defined and controlled by
the Connection line?

I have set as my connection string similar to the following:

"data source=VES;initial catalog=FS;password=xxx;persist security
info=True;user id=yyy;workstation id=zzz;packet size=4096"

Is there some default size of the Connection Pool?
Again, your service is leaking connections someplace. You should review
your code.

I am doing that now.

Thanks,

Tom
 

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