|
From: Bradley F. <br...@re...> - 2005-09-18 21:15:40
|
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:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
import Sybase
db =3D Sybase.connect('db','sa','sa','master',auto_commit=3DTrue)
db.execute("if exists (select name from sysobjects where name =3D
'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 =3D @num")
for i in range(200):
for j in range(1000):
c =3D db.cursor()
r =3D c.callproc('sp_test_output', {'@num': 12345, '@result':
Sybase.OUTPUT(1)})
#r =3D c.callproc('sp_test_output', {'@num': 12345,'@result': =
1})
print r
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
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
|