django-celery-beat icon indicating copy to clipboard operation
django-celery-beat copied to clipboard

Avoid loading all celery beat entities on create/update django admin forms

Open matthieudesprez opened this issue 3 years ago • 2 comments

Summary:

  • Celery Version: 5.0.5
  • Celery-Beat Version: 2.2.0

Exact steps to reproduce the issue:

  1. create 1M clocked schedules
  2. try to reach /admin/django_celery_beat/periodictask/add/
  3. 💥

Detailed information

Just run into this right now, we have a process that auto scheduled some tasks, and over the months it created more than a million clocked schedules. celery beat admin forms seem to try loading the whole list so it takes a long time to render and eventually times out on most server configurations.

matthieudesprez avatar May 10 '21 21:05 matthieudesprez

can you check the resource usage? if increasing server resources solve the issue to some extent?

auvipy avatar Jun 14 '21 08:06 auvipy

I'm pretty sure it will, but then having more clocked schedules might definitely causes the same issue because they're all loaded to appear in the dropdown of the periodic task form.

matthieudesprez avatar Jun 15 '21 21:06 matthieudesprez