-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default celery configurations #1591
Conversation
config/settings/base.py
Outdated
@@ -213,7 +213,21 @@ | |||
# https://docs.celeryproject.org/en/stable/userguide/optimizing.html#broker-connection-pools | |||
# https://docs.celeryq.dev/en/latest/userguide/optimizing.html#broker-connection-pools | |||
CELERY_BROKER_POOL_LIMIT = env( | |||
"CELERY_BROKER_POOL_LIMIT", default=env("CELERYD_CONCURRENCY", default=1000) | |||
"CELERY_BROKER_POOL_LIMIT", default=env("CELERYD_CONCURRENCY", default=0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Uxio0 I changed this value to 0 to open and close connections every time it is needed, maybe could be better a value less than 1000. I'm not sure about to put this to 0, because connections with rabbitMq were designed to be durable.
config/settings/base.py
Outdated
default=env("CELERY_BROKER_CONNECTION_MAX_RETRIES", default=0), | ||
) | ||
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#broker-channel-error-retry | ||
CELERY_BROKER_CHANNEL_ERROR_RETRY = env.int( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env.bool
967be8b
to
79d3131
Compare
@@ -13,4 +13,6 @@ fi | |||
sleep 10 | |||
|
|||
echo "==> $(date +%H:%M:%S) ==> Running Celery beat <==" | |||
exec celery -C -A config.celery_app beat -S django_celery_beat.schedulers:DatabaseScheduler --loglevel $log_level | |||
exec celery -C -A config.celery_app beat \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without-heartbeat
and so on are not required for the scheduler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like is a flag accepted only for workers.
safe-transaction-service-scheduler-1 | Error: No such option: --without-heartbeat
79d3131
to
d7cac92
Compare
Description
Several issues are appearing on
rabbitMq
connections, ("connection reset by peer", "missing heartbeat"...)One possible reason could be due the high number of messages that celery are sending to keep the heartbeat, mingle and gossip.
The following links explains a little bit more about it:
https://www.cloudamqp.com/docs/celery.html#commandline-arguments
celery/celery#4980
Also we change some default parameter that can be related:
Issues related
#1566