When broker restarts happen, the connection is not able to recover and the consequent publishes give the following error. When the service is restarted manually, the connection is fine and it is able to publish.
"logLevel":"ERROR","filename":"/Users/ar/Proj/app/models/amqp_queue.rb","method":"rescue in block in publish","msg":"Error in rabbitmq publish","error":"Trying to send frame through a closed connection. Frame is [#\u003cAMQ::Protocol::MethodFrame:0x000000012bd5fdc8 @payload=\"\x00\u003c\x00(\x00\x00\x06\x10private@@members\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::HeaderFrame:0x000000012bd5f2b0 @payload=\"\x00\u003c\x00\x00\x00\x00\x00\x00\x00\x00\x000\x98\x00\x18application/octet-stream\x02\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::BodyFrame:0x000000012bd5f260 @payload=\"{\\"type\\":\\"update\\",\\"id\\":114161848,\\"attributes\\":{}}\", @channel=1\u003e] Trying to send frame through a closed connection. Frame is [#\u003cAMQ::Protocol::MethodFrame:0x000000012bd5fdc8 @payload=\"\x00\u003c\x00(\x00\x00\x06\x10private@@members\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::HeaderFrame:0x000000012bd5f2b0 @payload=\"\x00\u003c\x00\x00\x00\x00\x00\x00\x00\x00\x000\x98\x00\x18application/octet-stream\x02\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::BodyFrame:0x000000012bd5f260 @payload=\"{\\"type\\":\\"update\\",\\"id\\":114161848,\\"attributes\\":{}}\", @channel=1\u003e]/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/session.rb:1143:in block in send_frameset'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/monitor.rb:235:inmon_synchronize'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/channel.rb:1460:in synchronize'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/session.rb:1136:insend_frameset'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/channel.rb:568:in basic_publish'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/exchange.rb:141:inpublish'\n/Users/ar/Proj/app/models/amqp_queue.rb:29:in block in publish'\n/Users/ar/Proj//app/models/amqp_queue.rb:26:intimes'\n/Users/ar/Proj//app/models/amqp_queue.rb:26:in publish'\n(irb):6:inirb_binding'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/workspace.rb:85:in eval'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/workspace.rb:85:inevaluate'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/context.rb:385:in evaluate'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:493:inblock (2 levels) in eval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:647:in signal_status'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:490:inblock in eval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:246:in block (2 levels) in each_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:232:inloop'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:232:in block in each_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:231:incatch'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:231:in each_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:489:ineval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:428:in block in run'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:427:incatch'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:427:in run'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:383:instart'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:64:in start'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:19:instart'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:96:in perform'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor/command.rb:27:inrun'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor.rb:387:indispatch'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/command/base.rb:69:in perform'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/command.rb:46:ininvoke'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands.rb:18:in \u003ctop (required)\u003e'\nbin/rails:4:inrequire'\nbin/rails:4:in `\u003cmain\u003e'","extraParams":{}}
Bunny version:2.14.2 RabbitMQ version: 3.8.17
When broker restarts happen, the connection is not able to recover and the consequent publishes give the following error. When the service is restarted manually, the connection is fine and it is able to publish.
"logLevel":"ERROR","filename":"/Users/ar/Proj/app/models/amqp_queue.rb","method":"rescue in block in publish","msg":"Error in rabbitmq publish","error":"Trying to send frame through a closed connection. Frame is [#\u003cAMQ::Protocol::MethodFrame:0x000000012bd5fdc8 @payload=\"\x00\u003c\x00(\x00\x00\x06\x10private@@members\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::HeaderFrame:0x000000012bd5f2b0 @payload=\"\x00\u003c\x00\x00\x00\x00\x00\x00\x00\x00\x000\x98\x00\x18application/octet-stream\x02\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::BodyFrame:0x000000012bd5f260 @payload=\"{\\"type\\":\\"update\\",\\"id\\":114161848,\\"attributes\\":{}}\", @channel=1\u003e] Trying to send frame through a closed connection. Frame is [#\u003cAMQ::Protocol::MethodFrame:0x000000012bd5fdc8 @payload=\"\x00\u003c\x00(\x00\x00\x06\x10private@@members\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::HeaderFrame:0x000000012bd5f2b0 @payload=\"\x00\u003c\x00\x00\x00\x00\x00\x00\x00\x00\x000\x98\x00\x18application/octet-stream\x02\x00\", @channel=1\u003e, #\u003cAMQ::Protocol::BodyFrame:0x000000012bd5f260 @payload=\"{\\"type\\":\\"update\\",\\"id\\":114161848,\\"attributes\\":{}}\", @channel=1\u003e]/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/session.rb:1143:in
block in send_frameset'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/monitor.rb:235:in
mon_synchronize'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/channel.rb:1460:insynchronize'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/session.rb:1136:in
send_frameset'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/channel.rb:568:inbasic_publish'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/bunny-2.19.0/lib/bunny/exchange.rb:141:in
publish'\n/Users/ar/Proj/app/models/amqp_queue.rb:29:inblock in publish'\n/Users/ar/Proj//app/models/amqp_queue.rb:26:in
times'\n/Users/ar/Proj//app/models/amqp_queue.rb:26:inpublish'\n(irb):6:in
irb_binding'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/workspace.rb:85:ineval'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/workspace.rb:85:in
evaluate'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/context.rb:385:inevaluate'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:493:in
block (2 levels) in eval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:647:insignal_status'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:490:in
block in eval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:246:inblock (2 levels) in each_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:232:in
loop'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:232:inblock in each_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:231:in
catch'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb/ruby-lex.rb:231:ineach_top_level_statement'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:489:in
eval_input'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:428:inblock in run'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:427:in
catch'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:427:inrun'\n/Users/ar/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/irb.rb:383:in
start'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:64:instart'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:19:in
start'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands/console/console_command.rb:96:inperform'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor/command.rb:27:in
run'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor/invocation.rb:126:ininvoke_command'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/thor-0.20.3/lib/thor.rb:387:in
dispatch'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/command/base.rb:69:inperform'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/command.rb:46:in
invoke'\n/Users/ar/.rvm/gems/ruby-2.6.5/gems/railties-5.2.5/lib/rails/commands.rb:18:in\u003ctop (required)\u003e'\nbin/rails:4:in
require'\nbin/rails:4:in `\u003cmain\u003e'","extraParams":{}}