-
|
Thanks for making Fil. We're trying to debug a slow leak in a webserver (resulting in an eventual OOM kill), and at first glance Fil looks ideal. However, I'm having trouble running gunicorn under it. my first effort looks something like this: fil-profile -o /fil-profile-output/ --no-browser run \
gunicorn --threads 4 --workers 1 --worker-class gthread myapp.wsgi -b 0.0.0.0:8080However this doesn't seem to work, due to the way that gunicorn forks worker processes before running our code. To its credit, Fil does give me this warning at startup: AFAICT to make this work I'd have to effectively get gunicorn to run worker subprocesses via Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
It's possible BTW that warning is unrelated to gunicorn (e.g. some Python modules run subprocesses on import). However, it does seem like even in One thing you can try is using a different WSGI server, given that presumably the memory leak is in your business logic, not the gunicorn. E.g. uvicorn appears to not use subprocesses if number of workers is 1, or |
Beta Was this translation helpful? Give feedback.
It's possible BTW that warning is unrelated to gunicorn (e.g. some Python modules run subprocesses on import). However, it does seem like even in
gthreadmode gunicorn launches subprocesses.One thing you can try is using a different WSGI server, given that presumably the memory leak is in your business logic, not the gunicorn. E.g. uvicorn appears to not use subprocesses if number of workers is 1, or
pip install twistedand thenPYTHONPATH=. twist web --wsgi=test.appworks for me giventest.pywith anapp()function.