Bug #21324 dllhost.exe memory leak
Submitted: 27 Jul 2006 21:49 Modified: 29 Jul 2006 13:34
Reporter: Uwe Pfeiffer Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.12 OS:Windows (Windows 2003 Web Server)
Assigned to: CPU Architecture:Any

[27 Jul 2006 21:49] Uwe Pfeiffer
Description:
I use Windows 2003 Web Server with IIS 6.0, MYSQL 5.0.11 with ODBC 3.51.12

The following ASP-Code only gets a value from a table.
I checked the increase of dllhost.exe memory.

After restart the server memory was 6.156 MBytes
Then I started the following (see repeat) code some times.

The memory increased from

Action                        Memory dllhost.exe
after restart server          6.156 MBytes 
1. start of code              6.176 MBytes
2. start of code              6.196 MBytes

Each start of code increases memory about 20 kBytes !!

Any idea why i loose the memory ?
All createObject - references are closed in function dblookup are closed.

In ODBC Configuration I only checked the options
- Don't optimize Column width
- Return Matching Rows

You can imagine that within some hours dllhost.exe will explode.

How to repeat:
Here is the code of test.asp

<%@ Language=VBScript %>

<%
strConnection = "Provider=MSDataShape;DSN=ASP_ATN;UID=root;PWD=root"

for i = 1 to 1
    Ergebnis = DBLookup ("Select Inhalt from systemeinstellungen where wert   = 'Debug-Modus'","Inhalt")
    response.write "Hello<br>"    
Next
response.write "Ready"

Function DBLookup (p_SQL_String,p_Feldname)

set frsConnection1 = server.CreateObject ("ADODB.Connection")
frsConnection1.ConnectionString = "Provider=MSDataShape;DSN=ASP_ATN;UID=root;PWD=root"
frsConnection1.Open

Set frsTemp1 = server.CreateObject ("ADODB.Recordset")

frsTemp1.open p_SQL_String, frsConnection1

if not frsTemp1.Eof then
   if p_Feldname <> "" then
      Ergebnis = frsTemp1(p_Feldname)
   else
      Ergebnis = frsTemp1(0)
   end if      
else
   Ergebnis = Null
end if

frsTemp1.close
Set frsTemp1 = nothing

frsConnection1.close
Set frsConnection1 = nothing

DBLookup = Ergebnis

End Function

%>
[28 Jul 2006 16:18] MySQL Verification Team
Thank you for the bug report. I just I am curious why you believe that
behavior belongs to MySQL Connector ODBC driver, doing a search I found
several reports regarding ISS/dllhost.exe not envolving MyODBC. Are you
tried to follow for example:

How to Troubleshoot Memory Leaks in IIS
http://support.microsoft.com/default.aspx?scid=kb;en-us;811140

Thanks advance.
[29 Jul 2006 9:44] Uwe Pfeiffer
Thanks for your reply. You are right. I now tried the source code against a Microsoft Access database and dllhost.exe is increasing rapidly too. So it's not a problem of MYSQL-ODBC.

I'm a tired of this problem and the fact that ASP/IIS obviously is not a stable platform for bigger web applications.

Thanks advance.
Uwe Pfeiffer
[29 Jul 2006 13:34] MySQL Verification Team
Thank you for the feedback. I am closing this bug report as not a bug.