Open MemoryLeak55 opened 1 year ago
Hey @thomas-thorburn-connect :wave:, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider backing us - every little helps!
We also offer priority support for our sponsors. If you require immediate assistance please consider sponsoring us.
Any news on this?
this issue seems to be related https://github.com/celery/kombu/issues/1065
Could be that you need to set CELERY_ACCEPT_CONTENT = ['msgpack', ...]
. That's required when using msgpack as a serializer.
Could be that you need to set
CELERY_ACCEPT_CONTENT = ['msgpack', ...]
. That's required when using msgpack as a serializer.
Wouldn't my test case settings be sufficient?
class Config:
event_serializer = 'msgpack'
task_serializer = "msgpack"
result_serializer = "msgpack"
accept_content = ["msgpack"]
result_accept_content = ["msgpack"]
Or is the all caps config item important?
Sorry didn't see the example, just thought I'd drop in in case it was helpful 🙇 Perhaps check that the settings load correctly? I think the serializers and other settings are displayed when you start celery
Checklist
main
branch of Celery.Mandatory Debugging Information
[x] I have included the output of
celery -A proj report
in the issue. (if you are not able to do this, then at least specify the Celery version affected).[x] I have verified that the issue exists against the
main
branch of Celery.[x] I have included the contents of
pip freeze
in the issue.[x] I have included all the versions of all the external dependencies required to reproduce this bug.
Optional Debugging Information
Related Issues and Possible Duplicates
Related Issues
Possible Duplicates
Environment & Settings
Celery version: 5.2.7 (dawn-chorus)
celery report
Output:``` accept_content: ['msgpack'] event_serializer: 'msgpack' result_accept_content: ['msgpack'] result_serializer: 'msgpack' task_serializer: 'msgpack' deprecated_settings: None software -> celery:5.2.7 (dawn-chorus) kombu:5.2.4 py:3.10.6 billiard:3.6.4.0 py-amqp:5.1.1 platform -> system:Linux arch:64bit, ELF kernel version:5.19.0-42-generic imp:CPython loader -> celery.loaders.app.AppLoader settings -> transport:amqp results:disabled accept_content: ['msgpack'] event_serializer: 'msgpack' result_accept_content: ['msgpack'] result_serializer: 'msgpack' task_serializer: 'msgpack' deprecated_settings: None ```
Steps to Reproduce
event_serializer = 'msgpack'
and run more than 1 celery worker.Required Dependencies
Python Packages
pip freeze
Output:``` amqp==5.1.1 billiard==3.6.4.0 celery==5.2.7 click==8.1.3 click-didyoumean==0.3.0 click-plugins==1.1.1 click-repl==0.2.0 kombu==5.2.4 msgpack==1.0.5 prompt-toolkit==3.0.38 pytz==2023.3 six==1.16.0 vine==5.0.0 wcwidth==0.2.6 ```
Other Dependencies
N/A
Minimally Reproducible Test Case
celeryconfig.py ```python from celery import Celery class Config: event_serializer = 'msgpack' task_serializer = "msgpack" result_serializer = "msgpack" accept_content = ["msgpack"] result_accept_content = ["msgpack"] celery_app = Celery('tasks') celery_app.config_from_object(Config) ``` tasks.py (not relevant but included) ```python from celeryconfig import celery_app @celery_app.task() def add(x, y): return x + y ``` Now, run two workers worker1 ```shell celery -A tasks worker --loglevel=info --concurrency=1 -P solo -n worker1@%h ``` worker2 ``` celery -A tasks worker --loglevel=info --concurrency=1 -P solo -n worker2@%h ``` observe ``` Refusing to deserialize disabled content of type msgpack (application/x-msgpack) ``` Repeated in logs of both workers every 2 seconds Now set ``` event_serializer = 'json' ``` and observe no more error
Expected Behavior
No error message regarding msgpack serialization
Actual Behavior
In logs every 2 seconds on both workers
I am not sure of the effects on the execution of the program, but I think I have narrowed it down to event serialization. Docs at https://docs.celeryq.dev/en/latest/userguide/configuration.html#std-setting-event_serializer do not explicitly state if msgpack is supported for events or not