问题:工作中使用supervisord管理进程,在配置一个新应用后重启该进程时报错:FATAL Exited too quickly (process log may have details)
方法:先根据supervisor配置中的日志路径,查看日志,发现日志中有报错的详细信息:
lock engine: pthread robust mutexes thunder lock: disabled (you can enable it with --thunder-lock) probably another instance of uWSGI is running on the same address (0.0.0.0:8003). bind(): Address already in use [core/socket.c line 769]
也就是说,supervisor重启的是uwsgi进程,uwsgi的配置参数:socket,也就是uwsgi的客户端将要连接的socket的地址:0.0.0.0:8003 已经被别的进程给占用了,所以需要修改下socket参数。
更新socket参数后,重启进程没有报错。