Skip to content

Conversation

fuggla
Copy link
Contributor

@fuggla fuggla commented Aug 15, 2024

Summary

Fixes timeout when stopping a wikmd container by changing the default container stop signal to SIGINT.

Details

The default signal to stop containers in Docker and Podman is SIGTERM, but flask apparently expects SIGINT. So stopping a container causes a timeout until Docker resorts to SIGKILL, which finally stops the container.

# Current container
$ time podman stop wiki
WARN[0010] StopSignal SIGTERM failed to stop container wiki in 10 seconds, resorting to SIGKILL 
wiki

real	0m10.265s

# STOPSIGNAL SIGINT
$ time podman stop wiki
wiki

real	0m0.195s

Checks

  • Tested changes

@Linbreux
Copy link
Owner

Could you share some documentation about this. I never experienced problems with this :)

@fuggla
Copy link
Contributor Author

fuggla commented Aug 20, 2024

Maybe I'm doing something wrong? This is my run command:

podman run -d  \
  --name wiki \
  --replace \
  --pull newer \
  -e TZ=$(timedatectl | grep "Time zone:" | awk '{ print $2 }') \
  -e PUID=$(id -u) \
  -e PGID=$(id -g) \
  -e LOCAL_MODE="True" \
  -e GIT_USER="foo bar" \
  -e GIT_EMAIL="[email protected]" \
  -p 5000:5000 \
  -v /home/fuggla/wiki:/wiki  \
  linbreux/wikmd:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants