PC Review


Reply
Thread Tools Rate Thread

Connection Pooling and low use web site

 
 
mikemad
Guest
Posts: n/a
 
      13th Jan 2005
I developed a website for a company. The site is in beta and is
infrequently used. However, when my customer does use it, it is very
slow the first time they access it. After that it's fine. I presume
this is because no one was using it so all the connections have timed
out. This won't be a problem in the future if they get at least one
user a minute.

Is there a setting to keep the last connection alive in a connection
pool so they never get this initial hit. I wrote a small app. to open
the home page every 30 seconds but it seems like there's a better way.
Thanks.

Mike

 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      13th Jan 2005
Hi,

Are you sure the connection pooling is bottleneck?
What provider are you using?

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

"mikemad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I developed a website for a company. The site is in beta and is
> infrequently used. However, when my customer does use it, it is very
> slow the first time they access it. After that it's fine. I presume
> this is because no one was using it so all the connections have timed
> out. This won't be a problem in the future if they get at least one
> user a minute.
>
> Is there a setting to keep the last connection alive in a connection
> pool so they never get this initial hit. I wrote a small app. to open
> the home page every 30 seconds but it seems like there's a better way.
> Thanks.
>
> Mike
>



 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      13th Jan 2005
Well it shouldn't be *very* slow the first time because of connection
pooling. The difference would be only slightly noticeable.
Could it be that the slowness is due to the application being compiled at
the first hit - like an ASP.NET app is?

BTW, run sp_who on your Sql Server and check and see how many connections
has ADO.NET opened and kept in the pool.

If you are damn sure that it is indeed connection pool (which again
shouldn't be *very* slow .. the difference should be in the order of
milliseconds unless your database server is on the other side of the
globe) - then come back .. we'll work it out

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik




"mikemad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I developed a website for a company. The site is in beta and is
> infrequently used. However, when my customer does use it, it is very
> slow the first time they access it. After that it's fine. I presume
> this is because no one was using it so all the connections have timed
> out. This won't be a problem in the future if they get at least one
> user a minute.
>
> Is there a setting to keep the last connection alive in a connection
> pool so they never get this initial hit. I wrote a small app. to open
> the home page every 30 seconds but it seems like there's a better way.
> Thanks.
>
> Mike
>



 
Reply With Quote
 
William \(Bill\) Vaughn
Guest
Posts: n/a
 
      13th Jan 2005
What DBMS? SQL Server? Access? Jet? Oracle?
Try setting the MinPoolSize=4 or so.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"mikemad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I developed a website for a company. The site is in beta and is
> infrequently used. However, when my customer does use it, it is very
> slow the first time they access it. After that it's fine. I presume
> this is because no one was using it so all the connections have timed
> out. This won't be a problem in the future if they get at least one
> user a minute.
>
> Is there a setting to keep the last connection alive in a connection
> pool so they never get this initial hit. I wrote a small app. to open
> the home page every 30 seconds but it seems like there's a better way.
> Thanks.
>
> Mike
>



 
Reply With Quote
 
Paul Hatcher
Guest
Posts: n/a
 
      13th Jan 2005
You'll probably find it's the compilation overhead the first time the pages
are accessed rather than the connection pooling

Paul

"mikemad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I developed a website for a company. The site is in beta and is
> infrequently used. However, when my customer does use it, it is very
> slow the first time they access it. After that it's fine. I presume
> this is because no one was using it so all the connections have timed
> out. This won't be a problem in the future if they get at least one
> user a minute.
>
> Is there a setting to keep the last connection alive in a connection
> pool so they never get this initial hit. I wrote a small app. to open
> the home page every 30 seconds but it seems like there's a better way.
> Thanks.
>
> Mike
>



 
Reply With Quote
 
mikemad
Guest
Posts: n/a
 
      13th Jan 2005
I apologize for not putting more information in here. True, I don't
know for sure that it is connection pooling. Yes, it is an ASP.NET
application with SQL server on the backend using ADO.NET. This is also
on Windows Server 2003. The DB is on the same machine as the Website.
The scenario is like this. I go to the web site the first time, it
takes several seconds for the first page to come up. The first page
does access the database. I close the browser, open a new browser, then
go to the site and it's lightning fast. Next, I wait about 5 minutes
(could be even less, like 1 minute), go to the site, and the first page
is slow again. This happens either at home or work so I don't think
it's a proxy server thing. If it was ASP.NET compiling then I'd only
have this problem once, correct?? I'll try your suggestions with
running sp_who as well as trying to change the minimum connection pool
size. Any more info would be appreciated.

Mike Maddox

 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      13th Jan 2005
Mike,

I am getting more and more certain that this would be due to ASP.NET and not
due to ADO.NET.
There could be multiple reasons for the appdomain reload other than a brand
new application deploy.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


"mikemad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I apologize for not putting more information in here. True, I don't
> know for sure that it is connection pooling. Yes, it is an ASP.NET
> application with SQL server on the backend using ADO.NET. This is also
> on Windows Server 2003. The DB is on the same machine as the Website.
> The scenario is like this. I go to the web site the first time, it
> takes several seconds for the first page to come up. The first page
> does access the database. I close the browser, open a new browser, then
> go to the site and it's lightning fast. Next, I wait about 5 minutes
> (could be even less, like 1 minute), go to the site, and the first page
> is slow again. This happens either at home or work so I don't think
> it's a proxy server thing. If it was ASP.NET compiling then I'd only
> have this problem once, correct?? I'll try your suggestions with
> running sp_who as well as trying to change the minimum connection pool
> size. Any more info would be appreciated.
>
> Mike Maddox
>



 
Reply With Quote
 
Pablo Castro [MS]
Guest
Posts: n/a
 
      15th Jan 2005
I agree with Sahil, it's hard to tell where the slowness is coming from, it
may or may not be caused by ADO.NET or ASP.NET.

If you want to keep the pool loaded with active connections, you can use the
"min pool size" connection string option. Set it so something like 5 or so.
That way you can try whether ADO.NET is causing trouble If it turns out
that this doesn't help I'd strongly recomend to revert back to its default
(0) so we don't have connections sitting in the pool for long periods of
time.

--
Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

This posting is provided "AS IS" with no warranties, and confers no rights.


"Sahil Malik" <(E-Mail Removed)> wrote in message
news:OaUC2Sb%(E-Mail Removed)...
> Mike,
>
> I am getting more and more certain that this would be due to ASP.NET and

not
> due to ADO.NET.
> There could be multiple reasons for the appdomain reload other than a

brand
> new application deploy.
>
> - Sahil Malik
> http://dotnetjunkies.com/weblog/sahilmalik
>
>
> "mikemad" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I apologize for not putting more information in here. True, I don't
> > know for sure that it is connection pooling. Yes, it is an ASP.NET
> > application with SQL server on the backend using ADO.NET. This is also
> > on Windows Server 2003. The DB is on the same machine as the Website.
> > The scenario is like this. I go to the web site the first time, it
> > takes several seconds for the first page to come up. The first page
> > does access the database. I close the browser, open a new browser, then
> > go to the site and it's lightning fast. Next, I wait about 5 minutes
> > (could be even less, like 1 minute), go to the site, and the first page
> > is slow again. This happens either at home or work so I don't think
> > it's a proxy server thing. If it was ASP.NET compiling then I'd only
> > have this problem once, correct?? I'll try your suggestions with
> > running sp_who as well as trying to change the minimum connection pool
> > size. Any more info would be appreciated.
> >
> > Mike Maddox
> >

>
>



 
Reply With Quote
 
Sahil Malik
Guest
Posts: n/a
 
      15th Jan 2005
;-)

There's no way an ADO.NET connection takes that long to open huh?

- SM

"Pablo Castro [MS]" <(E-Mail Removed)> wrote in message
news:%23m2JhKq%(E-Mail Removed)...
>I agree with Sahil, it's hard to tell where the slowness is coming from, it
> may or may not be caused by ADO.NET or ASP.NET.
>
> If you want to keep the pool loaded with active connections, you can use
> the
> "min pool size" connection string option. Set it so something like 5 or
> so.
> That way you can try whether ADO.NET is causing trouble If it turns
> out
> that this doesn't help I'd strongly recomend to revert back to its default
> (0) so we don't have connections sitting in the pool for long periods of
> time.
>
> --
> Pablo Castro
> Program Manager - ADO.NET Team
> Microsoft Corp.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Sahil Malik" <(E-Mail Removed)> wrote in message
> news:OaUC2Sb%(E-Mail Removed)...
>> Mike,
>>
>> I am getting more and more certain that this would be due to ASP.NET and

> not
>> due to ADO.NET.
>> There could be multiple reasons for the appdomain reload other than a

> brand
>> new application deploy.
>>
>> - Sahil Malik
>> http://dotnetjunkies.com/weblog/sahilmalik
>>
>>
>> "mikemad" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > I apologize for not putting more information in here. True, I don't
>> > know for sure that it is connection pooling. Yes, it is an ASP.NET
>> > application with SQL server on the backend using ADO.NET. This is also
>> > on Windows Server 2003. The DB is on the same machine as the Website.
>> > The scenario is like this. I go to the web site the first time, it
>> > takes several seconds for the first page to come up. The first page
>> > does access the database. I close the browser, open a new browser, then
>> > go to the site and it's lightning fast. Next, I wait about 5 minutes
>> > (could be even less, like 1 minute), go to the site, and the first page
>> > is slow again. This happens either at home or work so I don't think
>> > it's a proxy server thing. If it was ASP.NET compiling then I'd only
>> > have this problem once, correct?? I'll try your suggestions with
>> > running sp_who as well as trying to change the minimum connection pool
>> > size. Any more info would be appreciated.
>> >
>> > Mike Maddox
>> >

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I force connection pooling to keep at least one connection alive ? TheSteph Microsoft C# .NET 6 22nd Nov 2007 03:25 PM
Connection pooling parameters not working for Oracle connection yoram.ayalon@structuredweb.com Microsoft ADO .NET 1 29th Sep 2006 09:36 PM
Connection pooling. Jay Microsoft ADO .NET 3 3rd Nov 2004 12:37 PM
connection in connection pool with pooling=false Jason Collins Microsoft ADO .NET 10 22nd Jun 2004 01:21 PM
How do I turn off connection pooling in a connection string corbett Microsoft Dot NET 1 6th Jan 2004 11:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:17 PM.