Search code examples
celery

Celery worker go out of memory while running


I'm new in celery and I try to integrate celery with fast-api and rabitmq as broker the problem is when i start a worker with the command

 celery -A celery_worker.celery worker --loglevel=info

I go out of memory it's take more than 5 GB of RAM the project contain a lot of script with some heavy deep learning model


Solution

  • in case anyone have the same problem try to add the pool parameter

    celery -A celery_worker.celery worker --loglevel=info --pool gevent