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

Exception: 'Deliver' object has no attribute 'body_size' #3

Closed
viniciuschiele opened this issue Apr 23, 2015 · 12 comments
Closed

Exception: 'Deliver' object has no attribute 'body_size' #3

viniciuschiele opened this issue Apr 23, 2015 · 12 comments
Labels

Comments

@viniciuschiele
Copy link

I have been experiencing a strange error, just for some messages I got this error:

'Deliver' object has no attribute 'body_size'
channel.py (line: 253)

I looked at self._inbound and I saw some Deliver objects in sequence instead of Deliver/ContentHeader/ContentBody

amqp-storm

The messages are being sent to the queue by another project in another language, so I have no clue why it is happening.

@eandersson
Copy link
Owner

Hey! I'll take a look tonight and sort it out.

@eandersson eandersson added the bug label Apr 23, 2015
@eandersson
Copy link
Owner

@viniciuschiele:

I don't see why, or how you could have received two Deliver frames in a row, that must be a bug in RabbitMQ. What version are you running? Are you running multiple threads when consuming?

I pushed a minor fix, do you think you could clone the repo and try it out and if possible could you make sure that you are not losing any messages?

@viniciuschiele
Copy link
Author

RabbitMQ: 3.4.4

I'm not running multiple threads, I just created one thread to call channel.start_consuming()

Yes I can clone it but did you push your code? The last commit was 4 days ago

@eandersson
Copy link
Owner

I forgot to run git push. It should be there now! =] @e3d93dea99472f247e0e1d7ae9117d02f70bcbea

@eandersson
Copy link
Owner

@viniciuschiele Could you show me the contents of the two Deliver objects if it happens again?

@viniciuschiele
Copy link
Author

Same thing happened, some times I receive Deliver/ContentHeader/ContentHeader or Deliver/ContentHeader/Deliver... it seems to be unordered.

amqp-storm2

@viniciuschiele
Copy link
Author

I put no_ack=True to test and I lost all messages from the queue so I can't reproduce it again, I will have to wait until the other system to send new invalid messages, it might take some time :/

Next time I will try to set the prefetch_count

@eandersson
Copy link
Owner

My guess is that it was a bug, for some reason only the first frame (out of 3) was received from RabbitMQ. I guess it could have been a network issue?

With the patch I gave you it shouldn't crash, but if you have no_ack set to true, it could mean that you lose a message which is bad.

@viniciuschiele
Copy link
Author

@eandersson Today I was able to reproduce this issue again, so I just set prefetch_count=1 and it have solved this issue. Next time I will increase prefetch_count to see what will happen.

Thanks!

@eandersson
Copy link
Owner

So I am pretty sure this is a RabbitMQ bug. Do you know what language and library is used to send the messages? Any details I could use to try to reproduce this would be helpful.

@viniciuschiele
Copy link
Author

@eandersson I set prefetch_count to 10 and it has worked well, to me it solves this issue, I think you could close it.

I don't know what library they are using to send the messages because this software is not ours.

Thanks for your time.

@eandersson
Copy link
Owner

No worries @viniciuschiele. Thanks for the report and glad you got it sorted.

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

No branches or pull requests

2 participants