我正在使用nginx,并使用golang's fcgi模块运行fcgi协议。如何通过nginx自动恢复我的fcgi过程?
我的nginx.conf看起来就像
服务器{聆听80;server_name 127.0.0.1;根/home/off 2588/testdir;索引index.html;位置/{ access_log /home/off 2588/KARMA/nginx/access.log.home;proxy_pass_header服务器;proxy_set_header主机$http_host;proxy_redirect off;proxy_set_header X-Real $remote_addr;proxy_set_header X-Scheme $scheme;} location ~ /goapp { fastcgi.conf;fastcgi_pass 127.0.0.1:9001;}
发布于 2014-02-24 16:58:33
来自医生们
与Apache或Lighttpd不同,Nginx不会自动生成FCGI进程。你必须分开开始。
因此,您需要使用OS工具才能做到这一点。
我最喜欢的是监督d,但是还有很多其他的方法。
据我所知,当一个进程死亡时,重新启动它是没有出路的。
发布于 2014-06-24 06:41:53
我建议使用uwsgi来管理fcgi进程。它能够产生大量的人工进程,准备好输入,并在它们死后重新启动。高度可配置,易于安装和使用。
http://uwsgi-docs.readthedocs.org/en/latest/
我有选项工作者-exec,假脱机程序,进程,协议,启用线程和主集合.
https://stackoverflow.com/questions/21988024
复制相似问题