473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

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"
sqlConnectionString="data source=h7sql;Integrated Security=SSPI"
cookieless="false"
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 5355
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****************@TK2MSFTNGP11.phx.gbl...
We have the following settings in our web.config file to store session state on the SQL Server.

<sessionState
mode="SQLServer"
sqlConnectionString="data source=h7sql;Integrated Security=SSPI" cookieless="false"
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.net> wrote in message
news:eP**************@TK2MSFTNGP12.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****************@TK2MSFTNGP11.phx.gbl...
We have the following settings in our web.config file to store session

state
on the SQL Server.

<sessionState
mode="SQLServer"
sqlConnectionString="data source=h7sql;Integrated

Security=SSPI"
cookieless="false"
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.net> wrote in message
news:eP**************@TK2MSFTNGP12.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****************@TK2MSFTNGP11.phx.gbl...
> We have the following settings in our web.config file to store session

state
> on the SQL Server.
>
> <sessionState
> mode="SQLServer"
> sqlConnectionString="data source=h7sql;Integrated

Security=SSPI"
> cookieless="false"
> 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.com...
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.net> wrote in message
news:eP**************@TK2MSFTNGP12.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****************@TK2MSFTNGP11.phx.gbl...
> We have the following settings in our web.config file to store

session state
> on the SQL Server.
>
> <sessionState
> mode="SQLServer"
> sqlConnectionString="data source=h7sql;Integrated
Security=SSPI"
> cookieless="false"
> 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
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...
2
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...
0
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,...
0
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...
14
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...
4
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...
1
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.