You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we abruptly close a terminal window, all the processes spawned via bench start remain running in the background which upon invoking bench start again gives "address already in use" error and fails to spawn.
ps aux | grep -e $(bench pwd) -e $(bench get-redis-ports) and then killing those processes might do but feels very hacky.
Maybe if we keep the process pids somewhere we can then directly kill them when invoking bench stop command?
Maybe we can add signal handler in honcho to handle SIGHUP? which will cause all processes to exit as soon as terminal is closed.
Any/all thoughts are welcome :)
The text was updated successfully, but these errors were encountered:
phot0n
changed the title
EADDINUSE when directly closing the terminal instead of SIGTERM-ing bench
feat: bench stop
Jul 19, 2024
When we abruptly close a terminal window, all the processes spawned via
bench start
remain running in the background which upon invoking bench start again gives "address already in use" error and fails to spawn.Gitlab also faced this and they added another service which knows/monitors all the other spawned processes and allows users to stop the process (via a stop command (eg:
bench stop
)) before trying to start the services again (ref: https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/runit.md?ref_type=heads#why-replace-foreman). Maybe we could try something similar?ps aux | grep -e $(bench pwd) -e $(bench get-redis-ports)
and then killing those processes might do but feels very hacky.Maybe if we keep the process pids somewhere we can then directly kill them when invoking
bench stop
command?Maybe we can add signal handler in honcho to handle SIGHUP? which will cause all processes to exit as soon as terminal is closed.
Any/all thoughts are welcome :)
The text was updated successfully, but these errors were encountered: