No free Connection

Posts   
 
    
G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 18-Aug-2005 09:06:03   

Hi,

I am using self servicing and at some point I get this error message:

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.

It seems like some connections are not closed all the time. How can I make sure this does't happen, that connections are closed on time?

Gr.,

G.I.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 18-Aug-2005 10:48:40   

Connections are opened as late as possible and closed a.s.a.p. so that can't be it. What COULD be it, is that you keep Transaction objects around, as Transaction objects hold a connection, and keep it open until the Transaction is committed or rolled back and disposed. Is that the case in your situation?

Frans Bouma | Lead developer LLBLGen Pro
G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 19-Aug-2005 12:16:39   

No, this isn't related with my other problem with the UOW and transaction. Since I took that code out of my application after finding that out and I still have this problem.

I have found out that this problem only occurs when I am debugging, not when I have installed the application on my webserver locally. Could this help maybe?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 20-Aug-2005 02:24:27   

Does this happen no matter what part of your application you have used or is there a certain process that seems to create this problem?

G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 23-Aug-2005 11:57:32   

I have only have a little application yet that contains like 10 entities and a couple of collections, I use some dynamic lists and some typed lists, not much, so I can only say that I have noticed it in the whole application, not a small part. It does matter though if I go through the application faster. That way I get the problem faster, so I seems like it doesn't free the connection to the pool fast enough...

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 24-Aug-2005 04:15:07   

G.I. wrote:

No, this isn't related with my other problem with the UOW and transaction. Since I took that code out of my application after finding that out and I still have this problem.

Search on your project to ensure all of your Transaction objects were removed.

Google provided this link to the same error message: http://www.dotnet247.com/247reference/msgs/31/158758.aspx

Other thoughts: 1) Are you're making any standard ADO calls? If so make certain all conections are closed and ADO objects destroyed. 2) Do you have SQL Server Debugging turned on in your project? Turning it off should fix the problem.

G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 25-Aug-2005 08:46:13   

Lewis, turning of SQL Server debugging fixed the problem, thanks!

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 26-Aug-2005 05:01:09   

G.I. wrote:

Lewis, turning of SQL Server debugging fixed the problem, thanks!

I had a feeling that was going to be the winner. Glad to help!