global connection or seperate connections for each stored proc cal

global connection or seperate connections for each stored proc cal

Post by UGF1b » Fri, 18 Jun 2004 01:23:14


Hi I seem to recall reading that it can be a bit risky using just 1 global data connection in the global.aspx file, instead of multiple connections, but can not recall why. Also is there a lot of overhead with multiple connections? I did a search but did not find anything. Thanks.
--
Paul G
Software engineer.
 
 
 

global connection or seperate connections for each stored proc cal

Post by Patric » Fri, 18 Jun 2004 01:33:57

A global connection will be shared by all users of your web app making it a
bottleneck.

Usually you open/close a connection as needed so that you have an active
connection for each currently running request. Connection pooling takes care
of giving you a connection among a pool of connections.

This way :
- you don't have too much connection (one per user even for those inactive)
- you don't have not enough connection (having all users "fighting" for a
single connection)

Patrice

--

"Paul" < XXXX@XXXXX.COM > a rit dans le message de

data connection in the global.aspx file, instead of multiple connections,
but can not recall why. Also is there a lot of overhead with multiple
connections? I did a search but did not find anything. Thanks.

 
 
 

global connection or seperate connections for each stored proc cal

Post by William Ry » Fri, 18 Jun 2004 01:48:51


data connection in the global.aspx file, instead of multiple connections,
but can not recall why.
I can't imagine this being a viable option in most cases.

Also is there a lot of overhead with multiple connections?
Yes and no. There's overhead associated with opening and closing
connections and transferring data, but there's no way around this..if you
want multiple users this is going to happen. The real problem starts if you
don't close your connections. If you don't they aren't returned to the pool
and you can possibly run out of them. If you turn on pooling (which is on
by default) and close your connections when you are done with them, you
should be good to go.


I did a search but did not find anything. Thanks.



--

W.G. Ryan, eMVP

http://www.yqcomputer.com/
http://www.yqcomputer.com/
http://www.yqcomputer.com/