On 3 June 2011 21:57, Roberto De Ioris <robe...@unbit.it> wrote:

>
> > Hi,
> >
> > My models are relatively big in file size (> 200 kb in total).
> >
> > Is ALL this code being loaded into memory for each web request over and
> > over
> > again, and without reusing the same files (that do not change)?.
> >
> > I'm noticing a consistent increase in memory % in each of the
> uwsgi-python
> > processes/workers for simple web requests.
> >
> > This makes me think that web2py (or uwsgi-python) is loading the code for
> > all models into memory for each web request without any caching /
> reusing,
> > and without releasing any memory from previous requests, but only
> > consuming
> > more and more memory each time.
> >
> > This means that I run out of memory after a very few requests !
> >
> > Am I not correct above?, am I doing something wrong?, is this actually
> > expected?, does this occur regardless of the web server or wsgi
> > interface?.
> >
> > On a related note, should I move everything to modules (instead of
> > models)?,
> > will this fix the memory issues?.
> >
> > How can I solve this show-stopper problem?.
> >
> >
>
> Honestly, (without knowing your app) i do no think this is a problem
> related to web2py (and for sure it is not a uWSGI as its policy is: NO
> LEAK).
>
> Probably something in your app is leaking memory, but in the mean time you
> can "patch" the problem with something like
>
> --reload-on-rss <n>
>
> where n is the number of megs after which a worker is restarted (freeing
> its memory). I think 200 (megs) should be enough to maintain your
> webserver healthy.
>
> --
> Roberto De Ioris
> http://unbit.it
>

Hey, take a look about this bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480541

<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480541>Check to be sure
that you are getting real info with $ top

hope is useful for you.
Jhonny5.

-- 
Po fueno, po fale, po malegro.

talueee.com

  .,p***"*=b_
 ?P"    ._   `*b
|P   .d?'     &,9|
M:  |}        |- H'
&|   `#?_._oH'
`H.       "`"`'
  `#?.
       `^~.
Anyone can make something complicated, but it takes genius to make something
simple.

Linux User #236965 (counter.li.org)

Reply via email to