[Zope] SQLSession and Memory leak

Bill Anderson bill@libc.org
Fri, 26 May 2000 13:30:55 -0600


Hung Jung Lu wrote:
> 
> Hi,
> 
> This is just for people's information on my own experience in Zope memory
> leak. It may not reflect your personal case. But if it does, please post a
> note to the mailing list.
> 
> When there is a problem, people have to face it. I really dislike the
> attitude of people who just shrug their shoulders. I have seen this all too
> many times. Everytime I go through a problem and posted in to the mailing
> list, there are always people that try to say nonsense and refuse to accept
> that there is a problem. Guess what? Weeks later more and more people suffer
> similar problems.

Hung, if you recall, there were lots of people who when someone
mentioned a memory leak, looked at their process and misinterpreted the
threads' RAM reports. To be honest, it is exceedingly difficult to track
down memory leaks when you get an abundance of misinformation (I know,
not intentional, but is still makes it hard). Memory leaks are of prime
concern to me, as I have mentioned. I apologize if I came of as being
someone who thought there was _no_ memory leak, I just needed accurate
info to help. We were getting an increasing number of people who
suddenly thought they had memory leaks because of the way Linux reports
threads. Information like you have just provided (that you tracked it
down to SQLSession) is very useful, thanks for providing it. Though not
the maintainer, I will look into it.

> There are hundreds of people out there using SQLSession. I know for fact
> that someone using SQLSession has actually written a Unix cron job to
> restart Zope every night in order to keep the memory usage down. (Of course,
> the person does not know the memory leak is coming from SQLSession.)


Why not help them out and let them know? ;-)
I believe you can switch from SQLSession to FSSEssion with little, if
any DTML changes.
 
> From the manage_debug screen, it seems that the leak has something to do
> with the SQLSession inheriting from Implicit class. I don't remember much
> anymore (since I got rid of SQLSession already a while ago.) I just remember
> the keyword "Implicit" showing up in the objects in the manage_debug screen.
> 
> All I know is that after I stop using SQLSession (mainly with Gadfly, which
> was a temporary solution anyway), my problems stopped.

To be fair, Hung, SQLSession is not Zope, it is a third party product.
I would also send the information to the maintainer of SQLSession, so
he/she can be aware of it.