Roger, Attached are 2 scripts (ado-mem-test-04.py, ado-mem-test-05.py) for testing possible ADO memory leak problems. 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. 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. I apologize for the length (~65 lines) of each script. Thanks for taking a look at this. -- jv P.S. The scripts have always been run using python.exe rather than pythonwin, and my observations on memory usage come from the Windows Task Manager. Roger Upole wrote: Jim Vickroy wrote: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 causeDoes 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 Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32 |
ado-mem--test-05.py
Description: application/python
ado-mem--test-04.py
Description: application/python
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32