O
OL
Hello All,
I need help understanding DB connection mgmt.
Scenario:
- 3 separate Web application
- IIS 5 or 6
- dynamic pages for most part
- DB Backend is Adaptive server Anywhere from sybase (max 10 concurrent
connections)
- Single machine: win 2k server + IIS + DB engine (80GB HDD, P4 2.8GHz, 1GB
RAM)
10-11k users /day (each downloads as many as 10 - 12 dynamic pages/forms)
Using ODBC for DB connections (and queries, updates, deletes etc...).
This functionality is in a dll which I initialize in "global.asax"
"App_start" event, for each web application.
The webforms call functions in this dll. Queries are returned in a
datastore. Actions (updates, deletes etc...) return success/fail code.
1. I am concerned about deadlocks
2. would like to limit:
web app 1 to max 5 concurrent connection
web app 2 to max 3 concurrent connection
web app 3 to max 1 connection
leaving 1 connection for admin purpose.
not sure if this matters but the calls inside the dll are like so:
Queries
1. getDS(ByVal selectStr As String, ByRef ds As DataSet) As DataSet
getDS calls DoAdapterCreate(selectStr, objDA, cn)
objDA.Fill(ds)
Me.DoAdapterDestroy(objDA, cn)
return DS
2. DoAdapterCreate(selectStr, objDA, cn)
DoAdapterCreate calls:
doConnect(cn) - which returns a connected ODBC Connection to
DoAdapterCreate
DoAdapterCreate returns objDA (an OdbcDataAdapter)
3. Me.DoAdapterDestroy(objDA, cn)
objDA.Dispose()
objDA = Nothing
DoDisConnect(cn) closes CN and dispose of connection object
Do I need to set a Application("_connectionCount") variable? and make sure
count is not > then x (where x is number of allowed connections)
NonQueries
Operate in simmilar fashion call mades from webforms to dll
TIA
OL
I need help understanding DB connection mgmt.
Scenario:
- 3 separate Web application
- IIS 5 or 6
- dynamic pages for most part
- DB Backend is Adaptive server Anywhere from sybase (max 10 concurrent
connections)
- Single machine: win 2k server + IIS + DB engine (80GB HDD, P4 2.8GHz, 1GB
RAM)
10-11k users /day (each downloads as many as 10 - 12 dynamic pages/forms)
Using ODBC for DB connections (and queries, updates, deletes etc...).
This functionality is in a dll which I initialize in "global.asax"
"App_start" event, for each web application.
The webforms call functions in this dll. Queries are returned in a
datastore. Actions (updates, deletes etc...) return success/fail code.
1. I am concerned about deadlocks
2. would like to limit:
web app 1 to max 5 concurrent connection
web app 2 to max 3 concurrent connection
web app 3 to max 1 connection
leaving 1 connection for admin purpose.
not sure if this matters but the calls inside the dll are like so:
Queries
1. getDS(ByVal selectStr As String, ByRef ds As DataSet) As DataSet
getDS calls DoAdapterCreate(selectStr, objDA, cn)
objDA.Fill(ds)
Me.DoAdapterDestroy(objDA, cn)
return DS
2. DoAdapterCreate(selectStr, objDA, cn)
DoAdapterCreate calls:
doConnect(cn) - which returns a connected ODBC Connection to
DoAdapterCreate
DoAdapterCreate returns objDA (an OdbcDataAdapter)
3. Me.DoAdapterDestroy(objDA, cn)
objDA.Dispose()
objDA = Nothing
DoDisConnect(cn) closes CN and dispose of connection object
Do I need to set a Application("_connectionCount") variable? and make sure
count is not > then x (where x is number of allowed connections)
NonQueries
Operate in simmilar fashion call mades from webforms to dll
TIA
OL