global connection or seperate connections for each stored proc cal

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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 said:
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 said:
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.
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://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
 
Back
Top