web interface for gitlab runner does not show logging output
expected
I would expect to see the complete log output on web interface until my container execution is finished.
observation
web interface for gitlab runner stops showing logging output whenever there is a 150 seconds pause in logging output from the container.
The complete job takes ~6mins (including build from cache etc). My entrypoint written in bash in the main container stops writing anything to stdout/stderr for 150 seconds almost at the end of that process. When that script writes again to stdout/stderr I am missing the log on the "company".gitlab.com/.../jobs website. If I go onto the virtual machine and check with docker logs process00 I actually find the logs I would expect.
If I then add the following process to my entrypoint. I see a continuous logging including the complete log that I have been missing before on our website.
function heartBeat {
TIMEOUT=0
while [ true ] ; do
sleep 5;
TIMEOUT=$((TIMEOUT + 5))
echo "### $(basename $0) has been alive for $TIMEOUT seconds"
done
}
heartBeat &
more details
I run docker-compose with 4 containers in docker runner using a custom image. The same process runs on a shell runner does not cause that problem.
gitlab-ci.yml
test_pipeline:
stage: second_stage
image: $DOCKER_COMPOSE_IMAGE
tags:
- docker
except:
- schedule
script:
- docker-compose up --build --force-recreate --exit-code-from process00 2>&1
- echo "test_pipeline done"
cache: {}
gitlab-runner version
Version: 12.7.0
Git revision: 58272c27
Git branch: 12-7-stable
GO version: go1.13.5
Built: 2020-01-20T08:32:35+0000
OS/Arch: linux/amd64