Skip to content
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

Celery Getting Killed if message in queue is not in Correct format. #7975

Open
1 of 18 tasks
pranavdxl opened this issue Dec 22, 2022 · 2 comments
Open
1 of 18 tasks

Celery Getting Killed if message in queue is not in Correct format. #7975

pranavdxl opened this issue Dec 22, 2022 · 2 comments

Comments

@pranavdxl
Copy link

pranavdxl commented Dec 22, 2022

Checklist

  • I have verified that the issue exists against the main branch 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).

Mandatory Debugging Information

  • 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).
  • I have verified that the issue exists against the main branch of Celery.
  • I have included the contents of pip freeze in the issue.
  • I have included all the versions of all the external dependencies required
    to reproduce this bug.

Optional Debugging Information

  • 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

N/A

Minimally Reproducible Test Case

Celery Worker should not get killed

Celery Worker is getting killed if message is wrong

Some thrid party apps is putting data in the same redis queue through which celery is working. If message is mis formatted or some attributes are missing celery worker is getting klilled.

For example:

{
"body": "gASVPwAAAAAAAACMBmFzZGFzZJSFlH2UfZQojAljYWxsYmFja3OUTowIZXJyYmFja3OUTowFY2hhaW6UTowFY2hvcmSUTnWHlC4=",
"content-encoding": "binary",
"contentType": "application/x-python-serialize",
"headers": {
"lang": "py",
"task": "caldera_server.tasks.hello_task",
"id": "d0b6b9da-9503-4f3b-ae9e-bbb69f7412d5",
"shadow": null,
"eta": null,
"expires": null,
"group": null,
"group_index": null,
"retries": 0,
"timelimit": [
null,
null
],
"root_id": "d0b6b9da-9503-4f3b-ae9e-bbb69f7412d5",
"parent_id": null,
"argsrepr": "('asdasd',)",
"kwargsrepr": "{}",
"origin": "gen33195@DA00231",
"ignore_result": false
},
"properties": {
"correlation_id": "d0b6b9da-9503-4f3b-ae9e-bbb69f7412d5",
"reply_to": "94bdfc39-1575-3f5e-bfed-2b112e16368f",
"delivery_mode": 2,
"delivery_info": {
"exchange": "",
"routing_key": "celery"
},
"priority": 0,
"body_encoding": "base64",
"delivery_tag": "782773ea-ca49-4b9d-8f68-1998a03883b9"
}
}

Here instead of content-type its contentType. Which is causing celery worker getting killed.
image

@open-collective-bot
Copy link

Hey @pranavdxl 👋,
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.

@pranavdxl pranavdxl changed the title Celery Getting Killed if message in queue is not in proper format. Celery Getting Killed if message in queue is not in Correct format. Dec 22, 2022
@auvipy
Copy link
Member

auvipy commented Dec 22, 2022

isn't that an expected behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants