<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Roger,<br>
<br>
Attached are 2 scripts (ado-mem-test-04.py, ado-mem-test-05.py) for
testing possible ADO memory leak problems.<br>
<br>
ado-mem-test-04.py appears to exhibit a steady increase in memory
requirements with time; ado-mem-test-05.py does not appear to exhibit
this behavior.<br>
<br>
The primary difference between the two scripts is that -04 changes its
insert value each time via a prepared statement parameter while -05
simply uses the database table column default value (NULL) for each
insert.<br>
<br>
I apologize for the length (~65 lines) of each script.<br>
<br>
Thanks for taking a look at this.<br>
<br>
-- jv<br>
<br>
P.S.<br>
The scripts have always been run using python.exe rather than
pythonwin, and my observations on memory usage come from the Windows
Task Manager.<br>
<br>
<br>
<br>
Roger Upole wrote:
<blockquote cite="mid004601c6c7c4$9f848f20$0100a8c0@rupole" type="cite">
<pre wrap="">Jim Vickroy wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have a "fairly" simple test script that appears to exhibit a memory
leak when using ADO to insert rows in a SQL Server database via a
persistent connection.
Memory requirements monotonically increase with time (apparently in 4k
increments).
I'm using python 2.4.1, win32com (pywin32 build 209), and MS Windows XP
with all current updates.
Has anyone else seen this behavior?
Any thoughts about where the problem may be?
Thanks,
-- jv
P.S.
Earlier tests showed that:
* simply maintaining a persistent connection (for 24 hours) is not
the cause
* maintaining an active connection and the insert command object are
not the cause
</pre>
</blockquote>
<pre wrap=""><!---->
Does the script print anything, and are you running from pythonwin or
python.exe ? Pythonwin accumulates output indefinitely, whereas
python.exe eventually starts discarding it once you exceed the output
buffer size of the console window.
Could you post the script that demonstrates the problem ?
I'll try to set it up to run for a while in debug mode to see if
any problems show up with python refcounts or COM interface
refcounts.
Roger
_______________________________________________
Python-win32 mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-win32@python.org">Python-win32@python.org</a>
<a class="moz-txt-link-freetext" href="http://mail.python.org/mailman/listinfo/python-win32">http://mail.python.org/mailman/listinfo/python-win32</a>
</pre>
</blockquote>
<br>
</body>
</html>