Open osallou opened 6 years ago
seems to occur with process service
in rabbitmq server:
[root@ rabbitmq]# more config/generated/rabbitmq.config
[{rabbit,[{hipe_compile,false},
==> {heartbeat,0},
{tcp_listeners,[5672]},
...
Need to set a rabbitmq config file (example)
loopback_users.guest = false
listeners.tcp.default = 5672
default_pass = biomaj
default_user = biomaj
hipe_compile = false
heartbeat=0
and mount it via volumes:
volumes:
- ${BIOMAJ_DOCKER}/rabbitmq:/var/lib/rabbitmq
- ${BIOMAJ_DOCKER}/biomaj-config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:r
if heartbeat is needed, should be set to max job duration
PB: docker rabbitmq does not allow to overrride config file
Solution in docker-compose:
biomaj-rabbitmq:
image: rabbitmq
hostname: biomaj-rabbitmq
command: rabbitmq-server
entrypoint: ""
volumes:
- ./rabbitmq.config:/etc/rabbitmq/rabbitmq.config:ro
and rabbitmq.config:
[ { rabbit, [
{ heartbeat, 0 },
{ loopback_users, [ ] },
{ tcp_listeners, [ 5672 ] },
{ ssl_listeners, [ ] },
{ default_pass, <<"biomaj">> },
{ default_user, <<"biomaj">> },
{ hipe_compile, false }
] } ].
Even though clients set heartbeat_interval to 0, server closes some connections due to heartbeat timeouts rabbitmq should be configured with heartbeat=0 to disable it.