[rabbitmq-discuss] CRITICAL:pika.connection:Attempted to send frame when closed

shilpa karkera shilpa.karkera at finoux.com
Tue May 27 14:03:52 BST 2014


So you mean to say 'unmanaged multiple threads' on a single channel has 
caused this?
Yeah I've created these on a single channel which I was planning to 
change later.

Thus, yeah I'll try with multiple channels and with each having its own 
thread in it.

Thanks,
Will try that and check!
Shilpa Karkera


On Tuesday 27 May 2014 06:25 PM, Michael Klishin wrote:
>   On 27 May 2014 at 16:49:17, shilpa karkera (shilpa.karkera at finoux.com) wrote:
>>> =ERROR REPORT==== 27-May-2014(http://airmail.calendar/2014-05-27%2012:00:00%20GMT+4)::17:19:41
>> ===
>> AMQP connection <0.6238.0> (running), channel 1 - error:
>> {amqp_error,unexpected_frame,
>> "expected content header for class 60, got non content
>> header frame instead",
>> 'basic.publish'}
> Right, so this means RabbitMQ has encountered a connection-level error
> and notified Pika about it. So the connection is indeed closed.
>
> Now, why you may get this exception. You most likely share a channel between
> threads. It's OK to publish from multiple threads on the same connection
> but only when every channel uses its own thread.
>
> Every published message on the wire is 2 or more frames:
>
> [basic.publish method]+[content header]+[content body frame]*
>
> Concurrent publishes on the same channel w/o synchronization mean you will
> get frames interleaved incorrectly.
> --
> MK
>
> Software Engineer, Pivotal/RabbitMQ
>
>



More information about the rabbitmq-discuss mailing list