Cannot Restart without killing a process
Great app but it has a few bugs that are driving me crazy.
Shutting down the app (for instance when it hangs during an upload to HF) results in whatever is bound to port 8000 remaining bound and alive. When I restart the app it can see the server is already running but since it didn't start the process itself it refuses to connect and just get on with life. As a result I have to manually find it and kill it from the terminal....
(base) user@MacBook-Pro ~ % lsof -i TCP:8000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python3.1 10768 user 10u IPv4 0xfcbebde04e84f4e7 0t0 TCP *:irdmi (LISTEN)
python3.1 10768 user 15u IPv4 0xa59e25e39004194c 0t0 TCP localhost:irdmi->localhost:52546 (CLOSE_WAIT)
(base) user@MacBook-Pro ~ % ps -p 10768 -o args
ARGS
/Users/user/.transformerlab/envs/transformerlab/bin/python /
(base) user@MacBook-Pro ~ % sudo kill -SIGSEGV 10768
Ideally any shutdown of the app should kill the server process it started. However, if it can't it should kill and restart the process. I've tried using SIGHUP and SIGTERM but the only thing that seems to work is SIGSEGV (yes I know this is bad)
Also port 8000 is used by a lot of things. It would be lovely if this were configurable in some way. (perhaps it is and I just can't find it).
Thanks for the feedback. Might break this up into a few issues:
- Hanging on upload to HF: https://github.com/transformerlab/transformerlab-app/issues/209
- App doesn't clean up after itself on shutdown (will work on that one here since it matches the title).
- Ability to change default port is an existing issue, I will bump it: https://github.com/transformerlab/transformerlab-app/issues/146