473,587 Members | 2,230 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Server has too many connections

We have the following settings in our web.config file to store session state
on the SQL Server.

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=h7sql;In tegrated Security=SSPI"
cookieless="fal se"
timeout="200"
/>

We have found that we have a lot (80+ for 1 user) of connections to the
database left open for multiple days (by looking at our SQL Server monitor).

We had assumed that once the user logged off, the connection would be taken
away and then when a new user logged in, they would get their own
connections.

So I was wondering what connection activity people are seeing on their
servers?

Thanks.

STom
Nov 18 '05 #1
4 5368
How are you instantiating/storing your database connections?
You should open a database connection just before you need it on a page, and
then close the database connection as soon as possible when you're done
using it. Connection pooling generally makes this very efficient.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"STom" <st***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
We have the following settings in our web.config file to store session state on the SQL Server.

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=h7sql;In tegrated Security=SSPI" cookieless="fal se"
timeout="200"
/>

We have found that we have a lot (80+ for 1 user) of connections to the
database left open for multiple days (by looking at our SQL Server monitor).
We had assumed that once the user logged off, the connection would be taken away and then when a new user logged in, they would get their own
connections.

So I was wondering what connection activity people are seeing on their
servers?

Thanks.

STom

Nov 18 '05 #2
We are not opening or closing anything. It is asp.net that is doing the
opening and closing for the session state to be stored on SQL server. Am I
missing something here?

STom
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:eP******** ******@TK2MSFTN GP12.phx.gbl...
How are you instantiating/storing your database connections?
You should open a database connection just before you need it on a page, and then close the database connection as soon as possible when you're done
using it. Connection pooling generally makes this very efficient.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"STom" <st***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
We have the following settings in our web.config file to store session

state
on the SQL Server.

<sessionState
mode="SQLServer "
sqlConnectionSt ring="data source=h7sql;In tegrated

Security=SSPI"
cookieless="fal se"
timeout="200"
/>

We have found that we have a lot (80+ for 1 user) of connections to the
database left open for multiple days (by looking at our SQL Server

monitor).

We had assumed that once the user logged off, the connection would be

taken
away and then when a new user logged in, they would get their own
connections.

So I was wondering what connection activity people are seeing on their
servers?

Thanks.

STom


Nov 18 '05 #3
STom:

Asp.net could just be opening up a pool of connections to use. It
defintely does not assign a connection per user to manage session
state. 80+ seems a little high though. Does your app also open
connections to SQL Server?

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

On Mon, 12 Jan 2004 13:14:47 -0500, "STom" <st***********@ hotmail.com>
wrote:
We are not opening or closing anything. It is asp.net that is doing the
opening and closing for the session state to be stored on SQL server. Am I
missing something here?

STom
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:eP******* *******@TK2MSFT NGP12.phx.gbl.. .
How are you instantiating/storing your database connections?
You should open a database connection just before you need it on a page,

and
then close the database connection as soon as possible when you're done
using it. Connection pooling generally makes this very efficient.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"STom" <st***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
> We have the following settings in our web.config file to store session

state
> on the SQL Server.
>
> <sessionState
> mode="SQLServer "
> sqlConnectionSt ring="data source=h7sql;In tegrated

Security=SSPI"
> cookieless="fal se"
> timeout="200"
> />
>
> We have found that we have a lot (80+ for 1 user) of connections to the
> database left open for multiple days (by looking at our SQL Server

monitor).
>
> We had assumed that once the user logged off, the connection would be

taken
> away and then when a new user logged in, they would get their own
> connections.
>
> So I was wondering what connection activity people are seeing on their
> servers?
>
> Thanks.
>
> STom
>
>



Nov 18 '05 #4
No, the app does not open connections to the database, we have business
objects on the app server that do that but we can tell that it appears to be
the logged in user account that is connected plus it is the connections to
the asp state database that have a large number of connections.

STom
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:fj******** *************** *********@4ax.c om...
STom:

Asp.net could just be opening up a pool of connections to use. It
defintely does not assign a connection per user to manage session
state. 80+ seems a little high though. Does your app also open
connections to SQL Server?

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

On Mon, 12 Jan 2004 13:14:47 -0500, "STom" <st***********@ hotmail.com>
wrote:
We are not opening or closing anything. It is asp.net that is doing the
opening and closing for the session state to be stored on SQL server. Am Imissing something here?

STom
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:eP******* *******@TK2MSFT NGP12.phx.gbl.. .
How are you instantiating/storing your database connections?
You should open a database connection just before you need it on a page,
and
then close the database connection as soon as possible when you're done
using it. Connection pooling generally makes this very efficient.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"STom" <st***********@ hotmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
> We have the following settings in our web.config file to store

session state
> on the SQL Server.
>
> <sessionState
> mode="SQLServer "
> sqlConnectionSt ring="data source=h7sql;In tegrated
Security=SSPI"
> cookieless="fal se"
> timeout="200"
> />
>
> We have found that we have a lot (80+ for 1 user) of connections to the > database left open for multiple days (by looking at our SQL Server
monitor).
>
> We had assumed that once the user logged off, the connection would be
taken
> away and then when a new user logged in, they would get their own
> connections.
>
> So I was wondering what connection activity people are seeing on their > servers?
>
> Thanks.
>
> STom
>
>

Nov 18 '05 #5

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

Similar topics

13
2012
by: Fortepianissimo | last post by:
Here is the situation: I want my server started up upon connection. When the first connection comes in, the server is not running. The client realizes the fact, and then starts up the server and tries to connect again. This of course all happens on the same machine (local connection only). The connections can come in as fast as 30+/sec, so...
2
12527
by: Patrick | last post by:
Hello I have 3 Servers, all running Windows 2000. On two (WEB-1 & WEB-2) machine I run a website with IIS 5.0 and on the other an MS SQL Database 2000 (SQL-01). So I connect from the Websites to the Server using the following connection-string Provider=SQLOLEDB.1;Password=mypw;Persist Security Info=True;User ID=myuser;Initial...
0
2316
by: Michael Bourgon | last post by:
I've been having the same problem for 2 weeks now. If anyone has any ideas, I'd love to hear them. We are using both SQL and Windows Authentication. I was running a Profiler Trace at the time, and am going through it now but have not seen anything yet. Thanks in advance. About once a week, at no fixed time (but so far, between 8am and...
0
4664
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a number of different types of data coming in. I have a databuffer for each type of data coming in.
14
7021
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that sql server resides on is not reachable. The error is different depending on the connection string that I use. If I use the following connection...
4
3594
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket client and asynchronous socket server example code provided in the .NET framework developers guide is a great start but I have not dealt with...
1
5110
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from the control unit and store them into the Sql server - The operation console then retrieve this data from the sql for reporting and statistics...
5
3539
by: Cirene | last post by:
I just deployed my new ASP.NET (3.5 FW) site to the hosting company I'm using, webhost4life. NOTE: I HAVE deployed other SQL Server sites to the same account with no issues. Now I'm getting this error. Any idea why? Server Error in '/myuser4/MyWebApp' Application....
0
7843
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...
0
8339
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...
0
8220
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...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
1
2347
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
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.