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:
๐คonekiloparsec
Source:stackexchange.com