无可否认,这个问题困扰了我好几个月。我只是拖延了修复其他错误并将其放在一边直到现在必须修复的地方-
我正在尝试运行 2 个单独的 gunicorn 应用程序并在同一个 supervisord.conf 文件中启动 nginx。当我启动supervisor时,我能够成功运行handlecalls应用程序,但是当我访问commentbox负责加载的网站时,我收到内部服务错误(500)。
当我使用命令字段后面的命令分别运行 handlecalls 和 commentbox 应用程序时,应用程序运行良好。当我尝试使用 supervisord 运行两者时,为什么评论框程序给我一个 500 错误?
[program:nginx]
directory = /var/www/vmail
command = service nginx start -g "daemon off;"
autostart = True
[program:commentbox]
directory = /var/www/vmail
command = gunicorn app:app -bind 0.0.0.0:8000
autostart = True
[program:handlecalls]
directory = /var/www/vmail
command = gunicorn handle_calls:app --bind 0.0.0.0:8000
autostart = True
[supervisord]
directory = /var/www/vmail
logfile = /var/www/vmail/supervisorerrs.log
loglevel = trace
Run Code Online (Sandbox Code Playgroud)