Hi ,

" 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 am getting this error in my application. All requests to the Database go
through the Data Access layer.
And I am opening and Closing connections in the Data Access Layer. I cant
seem to find out why this is still happening ?

The Server Classes that I have are a mix of ServicedComponents and
non-ServicedComponents and the Data Access Layer
as such is marked as TransactionOption.Supported. How would COM+ affect
pooling ?

Any tips/pointers on how for further diagnosis would be helpful.

Regards ,
Vikram

Re: Max Connection Pool Reached ... by bruce

bruce
Thu Feb 19 12:18:11 CST 2004

adding COM+ support does not change the pooling. either you are getting too
many concurrent hits (maxing the pool) or your dal code is leaking
connections. the second is the more likely case.

some simple rules to prevent leaks

1) all connection opens (or queries) should be in a try/catch block, with
the finally closing the connection.
2) never return a open connection or datareader ( you can not trust the
caller to close it)

-- bruce (sqlwork.com)


"Vikram" <vikram404@hotmail.com> wrote in message
news:uHoh1Jx9DHA.2644@TK2MSFTNGP11.phx.gbl...
> Hi ,
>
> " 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 am getting this error in my application. All requests to the Database go
> through the Data Access layer.
> And I am opening and Closing connections in the Data Access Layer. I cant
> seem to find out why this is still happening ?
>
> The Server Classes that I have are a mix of ServicedComponents and
> non-ServicedComponents and the Data Access Layer
> as such is marked as TransactionOption.Supported. How would COM+ affect
> pooling ?
>
> Any tips/pointers on how for further diagnosis would be helpful.
>
> Regards ,
> Vikram
>
>
>
>



Re: Max Connection Pool Reached ... by Vikram

Vikram
Thu Feb 19 12:59:42 CST 2004

Thanks for the response...

I did notice that in a few places a new Connection has been created but the
open has not been called.
Will a SqlConnection object on which a new was done but an Open was not
called be considered a leak ??

Also, should I set ConnectionLifetime to some value ??

Regards,
Vikram


"bruce barker" <nospam_brubar@safeco.com> wrote in message
news:uHn38Sx9DHA.1472@TK2MSFTNGP11.phx.gbl...
> adding COM+ support does not change the pooling. either you are getting
too
> many concurrent hits (maxing the pool) or your dal code is leaking
> connections. the second is the more likely case.
>
> some simple rules to prevent leaks
>
> 1) all connection opens (or queries) should be in a try/catch block, with
> the finally closing the connection.
> 2) never return a open connection or datareader ( you can not trust the
> caller to close it)
>
> -- bruce (sqlwork.com)
>
>
> "Vikram" <vikram404@hotmail.com> wrote in message
> news:uHoh1Jx9DHA.2644@TK2MSFTNGP11.phx.gbl...
> > Hi ,
> >
> > " 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 am getting this error in my application. All requests to the Database
go
> > through the Data Access layer.
> > And I am opening and Closing connections in the Data Access Layer. I
cant
> > seem to find out why this is still happening ?
> >
> > The Server Classes that I have are a mix of ServicedComponents and
> > non-ServicedComponents and the Data Access Layer
> > as such is marked as TransactionOption.Supported. How would COM+ affect
> > pooling ?
> >
> > Any tips/pointers on how for further diagnosis would be helpful.
> >
> > Regards ,
> > Vikram
> >
> >
> >
> >
>
>



Re: Max Connection Pool Reached ... by Scott

Scott
Thu Feb 19 14:37:36 CST 2004

That would not cause a leak. Having an Open with no Close would cause
a problem, however.

--
Scott
http://www.OdeToCode.com

On Fri, 20 Feb 2004 00:29:42 +0530, "Vikram" <vikram404@hotmail.com>
wrote:

>Thanks for the response...
>
>I did notice that in a few places a new Connection has been created but the
>open has not been called.
>Will a SqlConnection object on which a new was done but an Open was not
>called be considered a leak ??
>
>Also, should I set ConnectionLifetime to some value ??
>
>Regards,
>Vikram
>
>
>"bruce barker" <nospam_brubar@safeco.com> wrote in message
>news:uHn38Sx9DHA.1472@TK2MSFTNGP11.phx.gbl...
>> adding COM+ support does not change the pooling. either you are getting
>too
>> many concurrent hits (maxing the pool) or your dal code is leaking
>> connections. the second is the more likely case.
>>
>> some simple rules to prevent leaks
>>
>> 1) all connection opens (or queries) should be in a try/catch block, with
>> the finally closing the connection.
>> 2) never return a open connection or datareader ( you can not trust the
>> caller to close it)
>>
>> -- bruce (sqlwork.com)
>>
>>
>> "Vikram" <vikram404@hotmail.com> wrote in message
>> news:uHoh1Jx9DHA.2644@TK2MSFTNGP11.phx.gbl...
>> > Hi ,
>> >
>> > " 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 am getting this error in my application. All requests to the Database
>go
>> > through the Data Access layer.
>> > And I am opening and Closing connections in the Data Access Layer. I
>cant
>> > seem to find out why this is still happening ?
>> >
>> > The Server Classes that I have are a mix of ServicedComponents and
>> > non-ServicedComponents and the Data Access Layer
>> > as such is marked as TransactionOption.Supported. How would COM+ affect
>> > pooling ?
>> >
>> > Any tips/pointers on how for further diagnosis would be helpful.
>> >
>> > Regards ,
>> > Vikram
>> >
>> >
>> >
>> >
>>
>>
>