如何修复 "Django celery is getting task and start processing but not completing the full job"

How to fix "Django celery is getting task and start processing but not completing the full job"

我正在使用 tensorflow 和 keras 处理 MaskRCNN 流行的实例分割问题。我也在使用django restframework来处理。当 celery 收到任务时,它开始处理并卡在中间。就像我正在处理两张图像并从中得出推论一样。但是在处理完第一张图像 celery stucks.

我正在使用 Amazon ec2 - g3s.xlarge 与 ubuntu 深度学习 AMI、django rest 框架、celery、tensorflow 和 keras

大项目所以不能显示代码

从两个图像处理中得到推断但卡在中间

我用这个命令得到了修复 -

celery -A prodapi worker -l info --without-gossip --without-mingle --without-heartbeat -Ofair --pool=solo