How can I release memory after creating matplotlib figures

后端 未结 2 1183
误落风尘
误落风尘 2020-11-29 19:08

I have several matlpotlib functions rolled into some django-celery tasks.

Every time the tasks are called more RAM is dedicated to python. Before too long, python is

2条回答
  •  死守一世寂寞
    2020-11-29 19:32

    Did you try to run you task function several times (in a for) to be sure that not your function is leaking no matter of celery? Make sure that django.settings.DEBUG is set False( The connection object holds all queries in memmory when DEBUG=True).

提交回复
热议问题