Skip to content

Throw an exception instead of trying to transmit a header frame that exceeds max frame size #362

Closed
@ibolotin

Description

@ibolotin

We ran into production issue with messages that had single huge header that exceeded max frame size. The client just creates and transmits huge header frame to server and as a result server shuts the connection down with frame_too_large error and that breaks all open channels and creates multiple application failures in completely unrelated threads as a result. This issue was very difficult to diagnose, but very easy to reproduce once we understood what was happening.

Specific place in the code that handles it is in AMQCommand.transmit method and it does check max frame size and fragments body already, just doesn't do any checks for content header frame.

Looking at rabbitmq/rabbitmq-server#921 - this might be also considered to be server-side issue (not conforming with what is documented), however it would be quite simple also to implement max frame size check on the client side and just reject messages with headers that exceed max frame size instead of trying to transmit header frame that breaks the connection and all its channels.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions