Open john8329 opened 3 years ago
Hi please share the service yaml used to reproduce this issue
version: '3.7'
services:
max:
image: '###############'
ports:
- '#####:#####'
volumes:
- max_data:/opt/max/data
environment:
DB_HOST: 'database'
DB_PORT: '#####'
DB_USER: '#####'
DB_PASS: '#####'
DB_NAME: '#####'
SERVER_NAME: ${CLIENT_NAME} Server
PRINT_SERVICE_WEB_HOST: print
networks:
- backend
depends_on:
- print
- database
labels:
#####.client-code: ${CLIENT_CODE}
#####.client-name: ${CLIENT_NAME}
deploy:
mode: global
restart_policy:
condition: on-failure
...
After doing some more tests today, I can confirm it's quite reproducible. New logs aren't shown, and old logs get mixed up. The timestamps should be the evidence. Happens only when seeing them from the service, not the container.
This has come up before as well https://github.com/portainer/portainer/issues/1942.
I'm going to suggest that this is really a Docker issue - https://github.com/moby/moby/issues/33673 (and many others) and I think you can improve it by using one of the more complicated log drivers - but there is buffering in the system, preferring not-losing info instead of preferring order
Bug description The log viewer window seems to display log lines in a chaotic order when the service is crashing at every startup, making inspections more difficult.
Expected behavior The logs should not mix lines but display them in the same order as they were emitted by the container(s)
Steps to reproduce the issue:
Technical details:
You can see in the screenshot that the golang trace is mixed with other lines (some details are obscured for security).
More details: