I found a similar issue with a db.py module with code like this in it...
from gluon.packages.dal.pydal import DAL, Field
db = DAL("sqlite://storage.sqlite")
db.define_table(
"test",
Field("myid", default=DEFAULT_VALUE, length=15),
Field("name", default=DEFAULT_VALUE, length=15),
Field("code", default=DEFAULT_VALUE, length=2),
)
every time the application was accessed the memory grew a little bit as if
these objects were never garbage collected after the http response was
sent. Is my assumption that this should be garbage collected incorrect?
If I let it run long enough I did run out of memory so it was never
cleaned up.
I am relatively new to web2py, I feel I must be missing something obvious
or this would be reported often.
On Friday, December 24, 2010 at 4:16:24 PM UTC-8, David Zejda wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> My web2py instance gradually eats memory, during day the consumption
> grows up to several gigs, so I have to restart often. According to guppy
> most of memory is occupied by gluon.dal.Field and other classes of dal:
>
> Partition of a set of 3231760 objects. Total size = 443724152 bytes.
> Index Count % Size % Cumulative % Kind
> 0 113419 4 189636568 43 189636568 43 dict of gluon.dal.Field
> 1 1324208 41 80561096 18 270197664 61 str
> 2 328642 10 15982732 4 286180396 64 tuple
> 3 26637 1 13851240 3 300031636 68 dict of
> gluon.validators.IS_IN_DB
> 4 98796 3 13436256 3 313467892 71 dict of gluon.dal.Set
> 5 20042 1 13344464 3 326812356 74 dict (no owner)
> 6 8199 0 11860464 3 338672820 76 gluon.dal.Row
> 7 16615 1 11482224 3 350155044 79 gluon.dal.Table
> 8 63682 2 8660752 2 358815796 81 dict of gluon.dal.Query
> 9 137779 4 7363776 2 366179572 83 list
> <2282 more rows. Type e.g. '_.more' to view.>
>
> The proportion is relatively stable. It seems that model definition
> remains in memory after each request. It is probably caused by a weird
> reference, but I'm not sure how to track it. Please do you have any ideas?
>
> Thanks :)
> David
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAk0VN9gACgkQ3oCkkciamVFHHwCfWiIkmrH9buBYA/7HvgIbz+mR
> ei0AniZ0UYwZtj9zagp2sx/IawmBE2iA
> =9cqX
> -----END PGP SIGNATURE-----
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.