[python-sybase] Sybase 0.37 BIG Memory Leak -- Simple Program
Bradley Feldman
bradley at relevantevidence.com
Sun Sep 18 14:16:44 EST 2005
Dave, et al:
I was noticing memory growing and growing steadily while accessing my
database using Sybase 0.37 (along with FreeTDS 0.62.4). This has become a
huge concern for me, so I wrote simple program to see if I could recreate
the problem.
Here's a simple program (slightly modified from Dave's 0.37 release notes)
that recreates the memory leak:
==========================
import Sybase
db = Sybase.connect('db','sa','sa','master',auto_commit=True)
db.execute("if exists (select name from sysobjects where name =
'sp_test_output') begin drop procedure sp_test_output end")
db.execute("create procedure sp_test_output @num int, @result int output as
select @result = @num")
for i in range(200):
for j in range(1000):
c = db.cursor()
r = c.callproc('sp_test_output', {'@num': 12345, '@result':
Sybase.OUTPUT(1)})
#r = c.callproc('sp_test_output', {'@num': 12345,'@result': 1})
print r
============================
Running this program and watching TOP - you'll see memory usage steadily
growing (with either callproc line). Should not be.
Please, this is a _very_ important concern. I'm happy to work with whomever
I need to debug/fix this and obtain a patched Sybase module.
Thanks in advance.
*Bradley
More information about the Python-sybase
mailing list