[Django]-Celery beat process allocating large amount of memory at startup

5๐Ÿ‘

I had the same problem. Searching around, I followed How many CPU cores has a heroku dyno? and Celery immediately exceeds memory on Heroku.

So I typed:

heroku run grep -c processor /proc/cpuinfo -a <app_name>

It returned 8. So I added --concurrency=4 to my Procfile line:

worker: celery -A <app> worker -l info -O fair --without-gossip --without-mingle --without-heartbeat --concurrency=4

And memory usage seemed to be divided by almost 2:

Screenshot of memory usage of worker Dyno on Heroku after the explained changes

๐Ÿ‘คonekiloparsec

Leave a comment