I would like to reduce the number of celery workers on Sentry’s container. I’ve checked the documentation at https://develop.sentry.dev/ but there’s not much to go on. Is this possible? If yes, how can I achieve this?
I think there’s only one worker inside the on-premise repo as a separate service. Can you share what you are trying to achieve?
The thing is, I have another app which uses celery with a different setup. When I have this app and sentry running, at times, they both consume a lot of CPU. So, I have made some changes to the other app to reduce resource utilisation including reducing worker_concurrency to 10. I need to do the same for Sentry’s celery which seems to use all 16 cores, as is the default. See htop screenshot
Ah, found it: https://github.com/getsentry/sentry/blob/a0f780bff768d5ad905421a16ce793e9a9a4f9a8/src/sentry/runner/commands/run.py#L180-L187
Pass -c 3
or something like that to the worker
service as an argument.