genouest / biomaj

BioMAJ
http://genouest.github.io/biomaj/
GNU Affero General Public License v3.0
12 stars 10 forks source link

Update remains waiting on process: should disable rabbitmq heartbeat #94

Open osallou opened 6 years ago

osallou commented 6 years ago

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.

osallou commented 6 years ago

seems to occur with process service

osallou commented 6 years ago

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
osallou commented 6 years ago

if heartbeat is needed, should be set to max job duration

osallou commented 6 years ago

PB: docker rabbitmq does not allow to overrride config file

osallou commented 6 years ago

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 }
] } ].