-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think you are right. It is highly probable that my app is leaking
somehow. I do not cache dal objects directly and I use finite set of
indentifiers for cached objects, but it is possible that some of my
objects reference dal objects in an unwanted way, leading to some kind
of circular references which prevent garbage collection. It is not easy
to identify where exactly is the problem rooted, because my model is
quite complex (more than 100 tables, highly interlinked, etc.) and I
cache business objects built above DAL a lot. Maybe I'll use some tool
to examine the references between objects in memory (objgraph?).

So, I agree that there is probably no leak directly in web2py or Rocket
and uWSGI does not bring cure for the memory leak disease causation, but
it removes the symptoms, which makes me satisfied for now. The new setup
is also more stable. With Rocket my web2py freezed every couple of hours
(http://groups.google.com/group/web2py/browse_thread/thread/bd4f6e9f20d1a5aa)
and I had to monitor its state and force restarts whenever it happened.
Now it either freezes no more or Cherokee restarts uwsgi behind the
scenes whenever necessary. :)

David

Timbo wrote:
> So you do use caching?  Is it RAM caching or disk caching?  If RAM
> caching, it could be that running under Cherokee and uWSGI is deleting
> the environment that web2py is run in after a certain number of
> requests.  This would reduce the usefulness of a RAM cache but would
> also produce the results you're seeing. Whereas a Python-based server
> (Rocket or Cherrypy) would not do this and a RAM cache would persist
> as long as the server process (or until otherwise deleted).
> 
> Please let us know when you look into the possibilities of caching
> being the issue.
> 
> @ron_m: Awesome.  Great suggestions!
> 
> -tim
> 
> On Dec 25, 3:20 pm, David Zejda <[email protected]> wrote:
>> Thanks for the all replies!
>>
>> I do not directly cache DAL objects, but yes, caching may be behind
>> the leak
>> through some references between objects. Maybe I'll examine it with
>> objgraph,
>> and I agree, it would be nice to have the function at hand in the
>> admin interface.
>>
>> Cherrypy & anyserver brings no significant change.
>>
>> With Cherokee & uWSGI the problem has gone. Moreover the new setup is
>> subjectively
>> faster to the previous one (Rocket behind Apache proxy). :)
>>
>> David
> 
> 

- --
David Zejda, Open-IT cz
web development & services
http://www.o-it.info
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAk0YZeMACgkQ3oCkkciamVFgdgCfczag6uRCsadFl+TtTBj+SDgV
BokAoLfKc4Caslc0QISWt1fXf6lAhCBv
=+XpP
-----END PGP SIGNATURE-----

Reply via email to