Python amqp intermittent pipe error

Quick question:

Should I pray that two independent applications are not using the same channel at the same time, telling RabbitMQ to prevent a "Broken Pipe Error"? (Or different from two or more independent applications?)

History:

I have written several applications, and one of them (io-server) acts as a server in terms of my other applications and acts as a client in terms of RabbitMQ server.

Now everything works as expected for about 10 minutes. Then my io server crashes. Here is the last part of the trace:

    File "/usr/local/lib/python2.7/dist-packages/amqp-1.4.2-py2.7.egg/amqp/transport.py", line 163, in write_frame
    frame_type, channel, size, payload, 0xce,
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 32] Broken pipe

Here is the relevant part of the RabbitMQ magazine:

=ERROR REPORT==== 31-Mar-2014::12:29:53 ===
AMQP connection <0.22183.0> (running), channel 1 - error:
{amqp_error,unexpected_frame,
            "expected content header for class 60, got non content header frame instead",
            'basic.publish'}

=INFO REPORT==== 31-Mar-2014::12:30:23 ===
closing AMQP connection <0.22183.0> (127.0.0.1:43367 -> 127.0.0.1:5672)

As far as I could look for a network, the most promising answer is here :

...
So yes, RabbitMQ closes the connection due to a connection-level error
with frame interleaving. 
...
 * Avoid publishing on *the same* channel from multiple threads
 * Synchronize publishing in your own code  

. ? ?

+4
2

, ?

. "" , , " Channel. () , .

?

. amqp -. , Channel() " -". , .

. , - HTTP- ; nginx + uwsgi, .

0

( @istepaniuk) , . , 1 .

0

Source: https://habr.com/ru/post/1534289/


All Articles