We run our services in swarm mode. One of the services is an MQ subscriber instance of a Rails application. It receives messages once a day and processes them.
Docker version is 17.06.2-ce, build cec0b72
The problem is that there're no logs shown in the service logs until we manually restart service with "docker service update --force". An assumption is that due to the inactivity the rest of the day it becomes "idle".
Here's the service config
service_1:
image: ${MQ_SUBSCRIBER_DOCKER_IMAGE}
environment:
<<: *service_env
command: 'bin/subscribe_to_mq'
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 3s
failure_action: continue
max_failure_ratio: 0.5
restart_policy:
condition: on-failure
delay: 30s
max_attempts: 5
How can we somehow prevent service being "idle"?