GPT-SoVITS icon indicating copy to clipboard operation
GPT-SoVITS copied to clipboard

Close gradio connections when using ctrl+c to kill the webui.py

Open bruce2233 opened this issue 1 year ago • 4 comments

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/app/GPT-SoVITS/webui.py", line 744, in <module>
    app.queue(concurrency_count=511, max_size=1022).launch(
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/gradio/blocks.py", line 1347, in launch
    server_name, server_port, local_url, app, server = networking.start_server(
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/gradio/networking.py", line 123, in start_server
    raise OSError(
OSError: Port 9874 is in use. If a gradio.Blocks is running on the port, you can close() it or gradio.close_all().

We have to wait for a long time.

bruce2233 avatar Jan 21 '24 17:01 bruce2233

try to reboot your server,or use lsof tool lsof -i:9874 kill [pid] -9

a-cold-bird avatar Jan 21 '24 18:01 a-cold-bird

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/app/GPT-SoVITS/webui.py", line 744, in <module>
    app.queue(concurrency_count=511, max_size=1022).launch(
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/gradio/blocks.py", line 1347, in launch
    server_name, server_port, local_url, app, server = networking.start_server(
  File "/root/miniconda3/envs/GPTSoVits/lib/python3.9/site-packages/gradio/networking.py", line 123, in start_server
    raise OSError(
OSError: Port 9874 is in use. If a gradio.Blocks is running on the port, you can close() it or gradio.close_all().

We have to wait for a long time.

same problem

selfboot avatar Jan 22 '24 03:01 selfboot

try to reboot your server,or use lsof tool lsof -i:9874 kill [pid] -9

I tried this but lsof doesn't ouput any information and the port is still in use.

bruce2233 avatar Jan 22 '24 03:01 bruce2233

try to reboot your server,or use lsof tool lsof -i:9874 kill [pid] -9

I tried this but lsof doesn't ouput any information and the port is still in use.

You can use ps aux | grep python, the kill the webui.py '[pid]

Liu-yixi avatar Jan 23 '24 11:01 Liu-yixi