The problem of memory usage that you experience has nothing to do with
the fact that code is executed at every request.Other users here do
not experience the problem.

In any case...

Python is a language that does not provide garbage collection. It
provides reference counting.
This is a major limitation of the language. It fails to detect certain
types of circular references.
web2py has code to catch them by calling the garbage collection
explicitly every 100 requests. Note every request because it would
cause a slow down.

Anyway, let's try to get to the bottom of this and isolate the
problem. What OS? What Python version? what web2py version? what
code?

Massimo


On Jun 3, 10:53 pm, Carlos <[email protected]> wrote:
> Thanks for all the recommendations.
>
> But it still worries me that web2py (or uwsgi) does not automatically (a)
> cache/reuse unmodified code and (b) release memory after requests are served
> (or while idle), after each web request, and regardless of how small or big
> models actually are.
>
>    Carlos

Reply via email to