I have a project with Django and I did a multiread with Gunicorn. but my project has a memory leak. I want to monitor memory with "memray" but I don't know how to use "memray".
During local development, I've had success by running:
python -m memray run manage.py runserver 0:8000 --nothreading
I haven't had memray running in production yet, but memray's documentation does mention --follow-fork may be useful when using Gunicorn.
Memray can optionally continue tracking in a child process after a parent process forks. This can be useful when using multiprocessing, or a framework utilizing a pre-fork pattern like Celery or Gunicorn.
发布评论
评论(1)
在本地开发过程中,我通过跑步取得了成功:
我还没有在生产中运行Memray,但是Memray的文档确实提到了
- 使用Gunicorn时,Memray的文档确实提到了
可能很有用。During local development, I've had success by running:
I haven't had memray running in production yet, but memray's documentation does mention
--follow-fork
may be useful when using Gunicorn.