openedx / openedx/openedx-platform
RabbitMQ config & compute_all_grades_for_course ETA are unable to work together, causing unrecoverable error on celery
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Since RabbitMQ 3.8.16, the configuration consumer_timeout is introduced and defaults to 30 mins.
compute_all_grades_for_course ETA/countdown is set to an hour in code (why is it an hour anyway?)
celery would not ACK the task until countdown is over and task starts processing. RMQ waits for 30 minutes and not gets ACK, so it deems the consumer dead.
Here's official doc (it happens to : https://docs.celeryq.dev/en/stable/userguide/calling.html#eta-and-countdown
Here's the same issue describe on celery: https://github.com/celery/celery/issues/6760
I cannot change the default consumer_timeout as I don't control the rmq. What's the easiest way to deal with this in edx code?
EDUCATOR-1088 for this change: https://github.com/openedx/edx-platform/pull/16165/files
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the compute_all_grades_for_course call site and the linked EDUCATOR-1088 pull request first, then compare its ETA/countdown behavior with Celery's documentation and RabbitMQ's consumer_timeout behavior. Done means the hour-long scheduling path no longer causes RabbitMQ to treat the consumer as dead or leaves the task unrecoverable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rabbitmq
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100