[python-sybase] Sybase 0.37 BIG Memory Leak -- Simple Program

Dave Cole djc at object-craft.com.au
Mon Sep 19 13:44:35 EST 2005


Bradley Feldman wrote:
> 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.

Sorry, I am extremely busy at the moment and cannot spare the time to
debug this.  Is anyone able to try the code with the Sybase client
libraries and verify if the same problem exists?

- Dave

-- 
http://www.object-craft.com.au


More information about the Python-sybase mailing list