FastApi 服务器上部署时,如果未正确关闭,进程不释放,且查不到进程id无法删除

启动时 报错,实际占用的进程已结束

INFO:     Will watch for changes in these directories: ['/root/app/image_upload']
ERROR:    [Errno 98] Address already in use

命令查看占用端口

netstat -tuln | grep 985

[root@root]# netstat -tuln | grep 985
tcp        0      0 0.0.0.0:985             0.0.0.0:*               LISTEN   

使用fuser清理进程

fuser -k 985/tcp

posted @ 2025-05-20 18:07  darling331  阅读(29)  评论(0)    收藏  举报