Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mem leak Oracle OLE DB?

Status
Not open for further replies.

jonelf

Programmer
Feb 21, 2001
22
SE
If I access the following ASP-page thousands of times with MS Web Application Stress Tool the inetinfo.exe private bytes grows and grows until it stops... Memory leak? Why?
NT4SP6a, Oracle OLE DB 8.1.7.1.0, MDAC 2.6.

ASP-file:

<%@ENABLESESSIONSTATE=FALSE%>
<!--METADATA TYPE=&quot;TypeLib&quot; FILE=&quot;C:\Program Files\Common Files\system\ado\msado15.dll&quot; -->
<%Option Explicit
Response.Expires = -1
Response.Write(&quot;<html><head><title>Mem leak</title></head><body>&quot;)

Public Function GetConnection() 'As ADODB.Connection
Set GetConnection = Server.CreateObject(&quot;ADODB.Connection&quot;)
With GetConnection
.CursorLocation = adUseClient
.ConnectionTimeout = 60
.ConnectionString = &quot;Provider=OraOLEDB.Oracle;User ID=xxx;Password=yyy;Persist Security Info=True;Data Source=zzz;CacheType=Memory;DistribTX=0&quot;
.Open
End With
End Function

' Here the docid is randomized it leaks without this
Randomize
dim docid,idocid
docid=Int((3 * Rnd) + 1)
Select case docid
case 1 idocid=1
case 2 idocid=541
case 3 idocid=463
End select

' Here comes the actual code
Dim oCm
Dim oConn
Set oCm = Server.CreateObject(&quot;ADODB.Command&quot;)
Set OcONN = GetConnection()
Set oCm.ActiveConnection = oConn
With oCm
.Parameters.Append .CreateParameter(&quot;p_document&quot;, adInteger, adParamInput, , iDocId)
.Parameters.Append .CreateParameter(&quot;p_meta_description&quot;, adVarChar, adParamOutput, 255)
.Parameters.Append .CreateParameter(&quot;p_meta_keywords&quot;, adVarChar, adParamOutput, 255)
.Parameters.Append .CreateParameter(&quot;p_status&quot;, adInteger, adParamOutput)
End With
oCm.CommandText = &quot;{CALL CMS_GET_DOCUMENT.get_document_meta_by_document(?,?,?,?)}&quot;
oCm.Properties(&quot;PLSQLRSet&quot;) = False
oCm.Execute

Response.Write oCm.Parameters(1).value & &quot;<br>&quot; & oCm.Parameters(2).value & &quot;<br>&quot;

'Here we clean up all the created objects

oConn.Close
Set oConn = Nothing
Set oCm.ActiveConnection = Nothing
Set oCm = nothing

Response.Write(&quot;</body></html>&quot;)%>

 
Later last night we tested to use the MS OLE DB provider for Oracle. The memory leak is gone!
There is but one problem, we are in other parts of the application accessing a BLOB-field (CLOB) and the MS provider doesn't support that.
We have reported the problem to Oracle, I'll keep you posted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top