473,809 Members | 2,791 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to make a web site stay connected to SQL server even though there are no users

A web site uses a SQL Server instance on another box and it takes a long
time to establish a connection. Is there any way to make the web site stay
connected to SQL server at all times, even though there are no users?

Thanks,

Keith
Oct 10 '06 #1
4 1781
Not that I'm aware of. The server will always try to optimize performance
and that includes dumping connections. Also, you could have problems when
the application unloads due to user inactivity. If the connection isn't
closed correctly it could become lost in the pool, ie: technically open but
unreferenced and not available.

Are you sure it's the connection that's causing a delay. A lot of users
mistake the initial load of the application as a delay in establishing a
connection when it's actually compiling the code first. How well optimized
is the database code itself? By this I mean are you performing proper
garbage collection on the various database connections and commands? If you
don't, you could be leaving resources laying around that are clogging up the
works.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Keithb" <no*****@dslext reme.comwrote in message
news:Ob******** ******@TK2MSFTN GP03.phx.gbl...
>A web site uses a SQL Server instance on another box and it takes a long
time to establish a connection. Is there any way to make the web site stay
connected to SQL server at all times, even though there are no users?

Thanks,

Keith

Oct 10 '06 #2
Thanks for your ideas. In my development environment the sql server instance
is on the same box as IIS, and the startup time is short. On the deployment
environment the sql server instance is on a different box and startup time
is l-o-n-g. However, once a connection is established, the web site itself
is fairly fast either way. For some reason it seems to take a long time
connecting.

Thanks again,

Keith
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Not that I'm aware of. The server will always try to optimize performance
and that includes dumping connections. Also, you could have problems when
the application unloads due to user inactivity. If the connection isn't
closed correctly it could become lost in the pool, ie: technically open
but unreferenced and not available.

Are you sure it's the connection that's causing a delay. A lot of users
mistake the initial load of the application as a delay in establishing a
connection when it's actually compiling the code first. How well optimized
is the database code itself? By this I mean are you performing proper
garbage collection on the various database connections and commands? If
you don't, you could be leaving resources laying around that are clogging
up the works.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Keithb" <no*****@dslext reme.comwrote in message
news:Ob******** ******@TK2MSFTN GP03.phx.gbl...
>>A web site uses a SQL Server instance on another box and it takes a long
time to establish a connection. Is there any way to make the web site stay
connected to SQL server at all times, even though there are no users?

Thanks,

Keith


Oct 10 '06 #3
Howdy,

Play with connection pooling parameters - i.e. change the 'Connection
Lifetime' parameter. (list of all parameters can be found here:
http://articles.techrepublic.com.com...3-6084879.html)

hope this helps

--
Milosz Skalecki
MCP, MCAD
"kbrickey" wrote:
Thanks for your ideas. In my development environment the sql server instance
is on the same box as IIS, and the startup time is short. On the deployment
environment the sql server instance is on a different box and startup time
is l-o-n-g. However, once a connection is established, the web site itself
is fairly fast either way. For some reason it seems to take a long time
connecting.

Thanks again,

Keith
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Not that I'm aware of. The server will always try to optimize performance
and that includes dumping connections. Also, you could have problems when
the application unloads due to user inactivity. If the connection isn't
closed correctly it could become lost in the pool, ie: technically open
but unreferenced and not available.

Are you sure it's the connection that's causing a delay. A lot of users
mistake the initial load of the application as a delay in establishing a
connection when it's actually compiling the code first. How well optimized
is the database code itself? By this I mean are you performing proper
garbage collection on the various database connections and commands? If
you don't, you could be leaving resources laying around that are clogging
up the works.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Keithb" <no*****@dslext reme.comwrote in message
news:Ob******** ******@TK2MSFTN GP03.phx.gbl...
>A web site uses a SQL Server instance on another box and it takes a long
time to establish a connection. Is there any way to make the web site stay
connected to SQL server at all times, even though there are no users?

Thanks,

Keith


Oct 10 '06 #4
>A web site uses a SQL Server instance on another box and it takes a long
>time to establish a connection. Is there any way to make the web site stay
connected to SQL server at all times, even though there are no users?
Use connection pooling with minimum number of threads greater than zero --
say 5 or 6.
--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujinionline.com
http://eduzine.edujinionline.com
-----------------------------------------
Oct 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
3853
by: Bruce W...1 | last post by:
This is a best practices question. For a website where PHP is used, does it make sense to have both .htm and .php files? In other words, for pages that have no active content there's no point in naming them with a .php extension. Is there any advantage or disadvantage to making all files .php, or the same for mixing them with .htm files? What do you do, and why?
3
13670
by: PW | last post by:
Hi, I'm using WinXP-Pro, ASP classic, IIS 5.0. I regularly get this error, but I know I am the only user accessing the website at the time of the error. I looked it up on the MS support webiste. Their recommendation is this ... ------------------
40
10845
by: Brian Jorgenson | last post by:
On my web page, I have a few hyperlinks with target frame of _blank. The hyperlink brings up a second window, but everytime I click on thie hperlink, it keeps bringing up a new window and not defaulting the the first active window. How do I make a hyperlink point to the active window? I don not want the hyperlink to default to the same page. I do want a second window but only a second window and not multiple pages.
8
3674
by: Max | last post by:
My client has decided to use the Euro for the entire web site. Is there an easy way to get my ASP.NET app to format currency to Euro instead of US-dollar? Right now it's just reading the server settings, but I'd rather set this say at start up in the global.asax since other web sites running on the server may not share this setting. -Max
20
2680
by: Dr. Colombes | last post by:
For a personal Web site with modest throughput and interactivity demans, I'm interested in your recommendation(s) for good (cheap, reliable, Linux friendly, very little, if any, sponsor advertising) Web site hosting company (in U.S.). Thanks!
0
1029
by: kbrolin65 | last post by:
Hi, folks. Please be patient, as I am not a programmer. But I wasn't sure where to turn for advice except for a programming discussion group. I am an intermediate PC user--fairly knowledgeable, but with a problem that even Web site technical support hasn't been able to solve. Here's a problem I've never encountered before wwithout a popup-blocker: inability to connect to Streamaudio.com , a multimedia site with links to live radio...
38
5085
by: ted | last post by:
I have an old link that was widely distributed. I would now like to put a link on that old page that will go to a new page without displaying anything.
6
2642
by: Gilles Ganault | last post by:
Hello A friend of mine is running a LAMP (PHP, MySQL, Apache, Debian) Web 2.0 site on a dedicated, hosted server with about 300 connected users when it's really busy. The server is an Intel Celeron 2.4 GHz with 1GB of RAM, a 40GB IDE drive, and a 10Mbps bandwith. Here's what top says:
1
47496
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10635
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.