-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Description
Sometimes celery beat crashes with the following error: UnpicklingError - invalid load key.
I will work on a fix soon.
Here is the relevant stack trace:
Traceback (most recent call last):
File "shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'entries'
Traceback (most recent call last):
File "celery/apps/beat.py", line 105, in start_scheduler
service.start()
File "celery/beat.py", line 636, in start
humanize_seconds(self.scheduler.max_interval))
File "kombu/utils/objects.py", line 30, in __get__
return super().__get__(instance, owner)
File "functools.py", line 993, in __get__
val = self.func(instance)
File "celery/beat.py", line 680, in scheduler
return self.get_scheduler()
File "celery/beat.py", line 671, in get_scheduler
return symbol_by_name(self.scheduler_cls, aliases=aliases)(
File "celery/beat.py", line 515, in __init__
super().__init__(*args, **kwargs)
File "celery/beat.py", line 271, in __init__
self.setup_schedule()
File "celery/beat.py", line 543, in setup_schedule
self._create_schedule()
File "celery/beat.py", line 572, in _create_schedule
self._store['entries']
File "shelve.py", line 114, in __getitem__
value = Unpickler(f).load()
UnpicklingError: invalid load key, '\xf2'.
Checklist
- I have verified that the issue exists against the
mainbranch of Celery. - This has already been asked to the discussions forum first.
- I have read the relevant section in the
contribution guide
on reporting bugs. - I have checked the issues list
for similar or identical bug reports. - I have checked the pull requests list
for existing proposed fixes. - I have checked the commit log
to find out if the bug was already fixed in the main branch. - I have included all related issues and possible duplicate issues
in this issue (If there are none, check this box anyway). - I have tried to reproduce the issue with pytest-celery and added the reproduction script below.
Mandatory Debugging Information
- I have included the output of
celery -A proj reportin the issue.
(if you are not able to do this, then at least specify the Celery
version affected). - I have verified that the issue exists against the
mainbranch of Celery. - I have included the contents of
pip freezein the issue. - I have included all the versions of all the external dependencies required
to reproduce this bug.
Optional Debugging Information
Here is the relevant stack trace:
Traceback (most recent call last):
File "shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: 'entries'
Traceback (most recent call last):
File "celery/apps/beat.py", line 105, in start_scheduler
service.start()
File "celery/beat.py", line 636, in start
humanize_seconds(self.scheduler.max_interval))
File "kombu/utils/objects.py", line 30, in __get__
return super().__get__(instance, owner)
File "functools.py", line 993, in __get__
val = self.func(instance)
File "celery/beat.py", line 680, in scheduler
return self.get_scheduler()
File "celery/beat.py", line 671, in get_scheduler
return symbol_by_name(self.scheduler_cls, aliases=aliases)(
File "celery/beat.py", line 515, in __init__
super().__init__(*args, **kwargs)
File "celery/beat.py", line 271, in __init__
self.setup_schedule()
File "celery/beat.py", line 543, in setup_schedule
self._create_schedule()
File "celery/beat.py", line 572, in _create_schedule
self._store['entries']
File "shelve.py", line 114, in __getitem__
value = Unpickler(f).load()
UnpicklingError: invalid load key, '\xf2'.
- I have tried reproducing the issue on more than one Python version
and/or implementation. - I have tried reproducing the issue on more than one message broker and/or
result backend. - I have tried reproducing the issue on more than one version of the message
broker and/or result backend. - I have tried reproducing the issue on more than one operating system.
- I have tried reproducing the issue on more than one workers pool.
- I have tried reproducing the issue with autoscaling, retries,
ETA/Countdown & rate limits disabled. - I have tried reproducing the issue after downgrading
and/or upgrading Celery and its dependencies.
Related Issues and Possible Duplicates
Related Issues
- None
Possible Duplicates
- None
Environment & Settings
Celery version:
celery report Output:
Steps to Reproduce
Required Dependencies
- Minimal Python Version: N/A or Unknown
- Minimal Celery Version: N/A or Unknown
- Minimal Kombu Version: N/A or Unknown
- Minimal Broker Version: N/A or Unknown
- Minimal Result Backend Version: N/A or Unknown
- Minimal OS and/or Kernel Version: N/A or Unknown
- Minimal Broker Client Version: N/A or Unknown
- Minimal Result Backend Client Version: N/A or Unknown
Python Packages
pip freeze Output:
Other Dependencies
Details
N/A
Minimally Reproducible Test Case
Details