Il 17/01/2016 12:12, Roberto De Ioris ha scritto:

Hello,

i have a python app that is consuming a lot of resident memory, 4 workers
are
consuming 600MB of resident memory each and growing so some leaks or very
bad
fragmentation.

In order to get more clue about what i going on i'd like to try something
like this:
http://smira.ru/wp-content/uploads/2011/08/heapy.html

So setting the baseline memory on postfork and dump the heap every now and
then.
Before digging in the source code was wondering if we have some hook
before
max-requests work reload is called. Do you think this approach makes
sense?


what about using the after_request hook ?

By the way, if you plan to use heapy/guppy maybe the best solution is
using a WSGI middleware

My plan was to take a snapshot every few before going to track each single request. The site has quite a bit of traffic and could be a bit intrusive. But yeah a wsgi middleware defintely makes sense. Or maybe i can just use a timer using a signal mapped to all workers to see if i am able to restrict to a subset of views.

--
Riccardo Magliocchetti
@rmistaken

http://menodizero.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to