且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

创建 matplotlib 图形后如何释放内存

更新时间:2023-02-02 21:35:39

您是否尝试多次运行您的任务函数(在 for 中)以确保您的函数不会泄漏,无论 celery 是什么?确保 django.settings.DEBUG 设置为 False(当 DEBUG=True 时,连接对象将所有查询保存在内存中).

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).