Hello everyone.
Faced the following situation.
I have a container in docker, sending logs through the Loki driver to the Loki server. Here is a snippet from docker-compose:
...
ports:
- '5000'
restart: always
logging:
driver: loki
options:
loki-url: http://my_grafana_loki_server:3100/loki/api/v1/push
...
Everything works great. But if for some reason the Loki server is unavailable (in my case, for example, the firewall prohibits access from the IP address to the port or just the server is not available), the container becomes unmanageable and sometimes completely malfunctioning. Stopping the container in this state takes a noticeable time up to 10 minutes.
Perhaps there are some practices to avoid this situation if the server with Loki is temporarily not working or Loki port is blocked, etc…
Thanks.