<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                [https://segmentfault.com/a/1190000003040086](https://segmentfault.com/a/1190000003040086) [https://blog.csdn.net/baidu\_15113429/article/details/84749624](https://blog.csdn.net/baidu_15113429/article/details/84749624) 錯誤解決方案:[https://my.oschina.net/michao/blog/738593](https://my.oschina.net/michao/blog/738593) supervisord : supervisor的服務器端部分,用于supervisor啟動 supervisorctl:啟動supervisor的命令行窗口,在該命令行中可執行start、stop、status、reload等操作。 重啟service?supervisord restart 或者重新載入?service?supervisord reload 查看進程 pstree ### /etc/supervisor/queue_MultiTask.conf ``` [program:queue_MultiTask] ;項目名稱 directory = /www/wwwroot/www.site.net ; 程序的啟動目錄 command = php think queue:listen --queue MultiTask --tries 3 ; 啟動命令 process_name=%(program_name)s_%(process_num)02d numprocs = 3 ; 開啟的進程數量 autostart = true ; 在 supervisord 啟動的時候也自動啟動 startsecs = 5 ; 啟動 5 秒后沒有異常退出,就當作已經正常啟動了 autorestart = true ; 程序異常退出后自動重啟 startretries = 3 ; 啟動失敗自動重試次數,默認是 3 user = www ; 用哪個用戶啟動 redirect_stderr = true ; 把 stderr 重定向到 stdout,默認 false stdout_logfile_maxbytes = 50MB ; stdout 日志文件大小,默認 50MB stdout_logfile_backups = 20 ; stdout 日志文件備份數 ; stdout 日志文件,需要手動創建目錄(supervisord 會自動創建日志文件) stdout_logfile = /www/wwwroot/www.site.net/queue_MultiTask.log loglevel=info ``` ![queue_MultiTask.conf](C:/Users/yuntao/AppData/Local/YNote/data/qqDFC5B97631B6C122F6F1961EB4495296/a7b56e9b5b1846788712e03d8363d052/attachment.png "queue_MultiTask.conf") supervisor守護跑php腳本后臺長期運行 [https://blog.csdn.net/lmjy102/article/details/81223346](https://blog.csdn.net/lmjy102/article/details/81223346) thinkphp隊列+supervisor實踐 [https://blog.csdn.net/idkuangxiao/article/details/82765107](https://blog.csdn.net/idkuangxiao/article/details/82765107) 開機啟動 [https://www.cnblogs.com/sundahua/p/9149692.html](https://www.cnblogs.com/sundahua/p/9149692.html) Supervisord 開機啟動 為了處理機器宕機重啟的情況,Redis 服務進程需要實現機器重啟后自動重啟的功能。 為此,需要配置 supervisord 進程隨著機器啟動而啟動。要實現這一目的 ,可以在 /etc/init 目錄下添加 supervisord.conf 文件: description "supervisord" start on runlevel \[2345\] stop on runlevel \[!2345\] respawn exec supervisord -n -c /etc/supervisor/supervisord.conf \--------------------- 作者:haozlee 來源:CSDN 原文:https://blog.csdn.net/lihao21/article/details/77689790 版權聲明:本文為博主原創文章,轉載請附上博文鏈接! [Supervisor 安裝與配置](https://segmentfault.com/a/1190000003040086) * [supervisor](https://segmentfault.com/t/supervisor/blogs) ?13.2k 次閱讀 ?·? 讀完需要 10 分鐘 0 [Supervisor] http://supervisord.org/ \[Python\] 如果沒有,自己去裝吧,一般 linux 自帶了. \[easy\_install\] \[root@vm source\]# wget https://bootstrap.pypa.io/ez\_setup.py -O - | python \[安裝superviosr\] \[root@vm source\]\# easy\_install supervisor \[狀態\] \[root@vm source\]\# python Python 2.6.6 (r266:84292, Jan 22 2014, 09:37:14) \[GCC 4.4.7 20120313 (Red Hat 4.4.7\-4)\] on linux2 Type "help", "copyright", "credits" or "license" for more information. \>>\> import supervisor \>>\> \[配置文件\] \[root@vm source\]# echo\_supervisord\_conf > /etc/supervisord.conf \[監視一個程序\] ; The \[include\] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files \*cannot\* ; include files themselves. \[include\] /\*\*我是注釋,一定要把前面的分號;去掉,不然不會開啟include功能,太傻了\*\*/ files = /etc/supervisor/\*.ini 在?/etc/supervisor/?目錄下建立?redis.ini?文件 \[program:redis\] command=/usr/bin/redis-server /usr/local/redis/redis.conf autorstart=true autorestart=true stdout\_logfile=/tmp/supervisor.log \[Web配置\] \[inet\_http\_server\] ; inet (TCP) server disabled by default port=\*:9001 ; (ip\_address:port specifier, \*:port for all iface) ;username=user ; (default is no username (open server)) ;password=123 ; (default is no password (open server)) 如果配置了用戶名和密碼,就需要輸入用戶名和密碼才能進入web界面。 \[啟動supervisord\] \[root@vm source\]\# supervisord 可能會輸出一堆信息出來 /usr/lib/python2.6/site-packages/supervisor\-3.1.3\-py2.6.egg/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. 'Supervisord is running as root and it is searching ' /usr/lib/python2.6/site-packages/supervisor\-3.1.3\-py2.6.egg/supervisor/options.py:383: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately. return pkg\_resources.EntryPoint.parse("x="+spec).load(False) 不用管它 \[root@vm source\]\# ps -ef |grep supervisord root 20041 1 0 03:21 ? 00:00:00 /usr/bin/python /usr/bin/supervisord \[root@vm source\]\# ps -ef| grep redis root 20074 20073 0 03:23 ? 00:00:00 /usr/bin/redis-server \*:6379 有上述進程,就表明成功了。 \[WEB管理界面\] ![](http://cdn.yuntao.lengzhiwei.com/a7ed1c0e4210c7771b53962e8422dc04) \[命令行管理工具\] \[root@vm source\]# supervisorctl status redis RUNNING pid 20074, uptime 0:13:25 錯誤解決方案:[https://my.oschina.net/michao/blog/738593](https://my.oschina.net/michao/blog/738593) mac supervisor error :Another program is already listening on a port that one of our HTTP servers is? ![](C:/Users/yuntao/AppData/Local/YNote/data/qqDFC5B97631B6C122F6F1961EB4495296/602544f9d3244c25ae4f98fc672c6513/hot3.png) * 錯誤 Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord. For help, use /usr/local/bin/supervisord -h * 解決方案 * 好像是supervisor已經在運行了,現在要再啟動就得把之前的kill掉 $ ps -ef | grep supervisord 0 5622 1 0 2:33上午 ?? 0:00.84 /usr/bin/python /usr/local/Cellar/supervisor/3.2.1/libexec/bin/supervisord -c /etc/supervisor/supervisord.conf 501 7459 5853 0 3:26上午 ttys003 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn supervisord $ sudo kill -9 5622 $ supervisord 就OK了 * 錯誤 Unlinking stale socket /tmp/supervisor.sock \*解決方案 $ sudo unlink /tmp/supervisor.sock $ ps -ef | grep supervisord $ sudo kill -9 5622 $ supervisord
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看