On 12 kesä, 17:59, Greg Donald <gdon...@gmail.com> wrote: > Over the weekend I upgraded my project to Django 1.4. After the > upgrade my Apache/mod_wsgi setup began running out of memory. I > increased the memory capacity of my virtual servers, but that only > extended the time until they began to swap again. I found a blog > article that suggested setting Apache's MaxRequestsPerChild to > something other than 0. After setting it to 25, Apache seems to be > releasing memory again. > > My question is, why did I have to do that? The only thing that > changed is my Django version from 1.3 -> 1.4. I have Debug=False in > settings.py, so I don't think I'm experiencing the SQL memory buildup > described on a couple of blogs. I do have some long running scripts > that use Django outside of Apache, so I implemented db.reset_queries() > in those, but it had no noticeable effect. They didn't appear to be > using any more memory than normal, but I figured it couldn't hurt. > > So everything is running fine again, but something changed in Django > 1.4 that causes my same project code to leak memory. I'd sure like to > figure it out.
I don't remember seeing memory leak issues reported for 1.3 -> 1.4 uprgades (which doesn't mean they do not exist). It is very hard to say where the problem might be without further details. I don't have much experience in memory leak debugging, but this post for example looks promising: http://www.lshift.net/blog/2008/11/14/tracing-python-memory-leaks - Anssi -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.