B
Big George
Asp.net 2.0 using odp.net 10.1.04 to connect to Oracle 10g
Our web application has this problem: ODP-1000 "Connection request
timed out".
As we know, this is a memory leak problem, caused due open connections
that don't get closed and disposed.
We have double checked our code and all connections after open are
closed and disposed. All odp.net objects like OracleCommand,
Oracledatareader are disposed after used.
As we can't find in our code any unclosed connection, is there any way
to force connection when conn.Open gets error "Connection request
timed out"?
When we get error "Connection request timed out", asp.net program can
connect after closing it and load it again, then . So, I think if I
can force it with this function:
Public Sub OpenConnection(ByRef conn As OracleConnection)
Do While conn.State <> ConnectionState.Open
Try
'Connection with Pooling=True
conn = New
Oracle.DataAccess.Client.OracleConnection("user id=xxx;data
source=xxx;password=xxx;Pooling=True;Connection Timeout=15;Incr Pool
Size=5;Decr Pool Size=3;Max Pool Size=300;Min Pool Size=10;Validate
Connection=true;")
If (conn.State <> ConnectionState.Closed) Then
conn.Close()
conn.Open()
Catch ex As Exception
If (conn.State <> ConnectionState.Closed) Then
conn.Close()
'Alternative Connection with Pooling=False
conn = New
Oracle.DataAccess.Client.OracleConnection(user id=xxx;data
source=xxx;password=xxx;Pooling=False;Connection Timeout=15
conn.Open()
End If
End Try
Loop
End Sub
Could it loop to infinite if never catch an available connection? It
would be necessary to create a new asp.net session in order to get
connection to database?
Our web application has this problem: ODP-1000 "Connection request
timed out".
As we know, this is a memory leak problem, caused due open connections
that don't get closed and disposed.
We have double checked our code and all connections after open are
closed and disposed. All odp.net objects like OracleCommand,
Oracledatareader are disposed after used.
As we can't find in our code any unclosed connection, is there any way
to force connection when conn.Open gets error "Connection request
timed out"?
When we get error "Connection request timed out", asp.net program can
connect after closing it and load it again, then . So, I think if I
can force it with this function:
Public Sub OpenConnection(ByRef conn As OracleConnection)
Do While conn.State <> ConnectionState.Open
Try
'Connection with Pooling=True
conn = New
Oracle.DataAccess.Client.OracleConnection("user id=xxx;data
source=xxx;password=xxx;Pooling=True;Connection Timeout=15;Incr Pool
Size=5;Decr Pool Size=3;Max Pool Size=300;Min Pool Size=10;Validate
Connection=true;")
If (conn.State <> ConnectionState.Closed) Then
conn.Close()
conn.Open()
Catch ex As Exception
If (conn.State <> ConnectionState.Closed) Then
conn.Close()
'Alternative Connection with Pooling=False
conn = New
Oracle.DataAccess.Client.OracleConnection(user id=xxx;data
source=xxx;password=xxx;Pooling=False;Connection Timeout=15
conn.Open()
End If
End Try
Loop
End Sub
Could it loop to infinite if never catch an available connection? It
would be necessary to create a new asp.net session in order to get
connection to database?