/facepalm
Okay, debugtoolbar does that. If I disable it from config, everything
works fine. My fault. Been hunting for this memory leak for two days
straight and it never occurred to me that even the command line
bootstrapped Pyramid, when using development.ini, will have the debug
toolbar on.
Sorry for wasting your time, folks.
I'm sending this email to the SQLAlchemy list too, where I asked about
this problem, for further reference in case anyone else has the same
problem....
.oO V Oo.
On 02/23/2012 02:24 PM, Vlad K. wrote:
Hi all.
I have a Pyramid bootstrapped script that has to process thousands of
rows (on relatively complex model relationships) per call from command
line. Pyramid is bootstrapped to reuse models and helper functions
from the main web application this script is part of.
The problem I'm having is that in each iteration and/or individual
transaction, the memory keeps growing, seems like SQLAlchemy objects
are not released. A self-sufficient example script is here:
https://gist.github.com/d669e958c54869c69831
Without bootstrapping Pyramid (comment out line 266 and set env=None
or something), the gcdelta is 0 or negative. With Pyramid bootstrapped
(note that nothing else touches the application or request, only
bootstrap is called) the gcdelta is in thousands per 200 iterations.
Fedora 16 x86_64
PostgreSQL 9.1
Pyramid 1.2.1 (except sqlalchemy and psycopg2, all dependencies are
default given with 1.2.1 installation)
SQLAlchemy 0.7.5
Psycopg2 2.4.4
Transaction 1.1.1
Zope.Sqlalchemy 0.6.1
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.