Reply To: How to finish the process in case of error

Home Forums Basic Erlang How to finish the process in case of error Reply To: How to finish the process in case of error

#37021

Aklaim
Member

Hi Simon,

Link will not work. If i create link between them and then try to terminate Worker, RabbitMq superviser will crash with error:

“12:26:57.577 [error] Supervisor {<0.106.0>,amqp_channel_sup} had child channel started with amqp_channel:start_link(network, <0.97.0>, 1, <0.107.0>) at <0.108.0> exit with reason killed in context child_terminated
12:26:57.578 [error] Supervisor {<0.106.0>,amqp_channel_sup} had child channel started with amqp_channel:start_link(network, <0.97.0>, 1, <0.107.0>) at <0.108.0> exit with reason reached_max_restart_intensity in context shutdown
12:26:57.578 [error] Connection (<0.97.0>) closing: internal error in channel (<0.108.0>): killed”

Yes, RabbitMQ keep Connection processes alive after their respective Workers have died. Actualy they are not connections, they are channels to single connection.

As a solution, should i store all connections pid in ets table of Worker Manager? And when Worker restarts, give him pid of already opened connection. But this will not solve the problem of lost connections if Worker Manager crash.

  • This reply was modified 8 months, 4 weeks ago by  Aklaim.