zoukankan      html  css  js  c++  java
  • Supervisor

    项目代码一般在 /var/www/
    项目日志一般在 /var/log/
    用supervisor启动的项目,配置文件应该放在 /etc/supervisor/conf.d/ 。要在服务器上运行一个项目,把启动配置文件放在那个目录下,supervisor会自动管理。

    supervisor自身日志位置:/var/log/supervisor/supervisord.log

    在/etc/supervisor/conf.d目录下新建一个socweb的启动配置文件socweb_gov_ha.conf

    重新加载supervisor,加载后默认会启动.conf配置文件里的内容

    supervisorctl reload
    

    也可以手动启动

    supervisorctl restart socweb_ha
    supervisorctl restart socweb_ha_celery
    supervisorctl restart socweb_ha_discover
    

    查看当前启动的supervisor任务:sudo supervisorctl ,执行完这个会进入supervisor命令行模式,可以与supervisor进行交互式操作,如下:

    supervisor> status
    supervisor> restart/start/stop/status socweb_ha socweb_ha_celery socweb_ha_discover
    

      

    记录一次调错过程:

    sudo supervisorctl update
    cat /etc/supervisor/conf.d/socweb_ai.conf
    cat supervisord.log
    
    sudo systemctl status/start supervisor.service
    sudo vi socweb_ai.conf
    
    
    /var/www/socwebai/venv_socwebai/bin/celery -A app.celery.base worker -l info -n socwebai
    sudo chown -R soc:soc socwebai/
    
    
    which python3
    which python
    
    
    sudo supervisord -c socweb_ai.conf 
    
  • 相关阅读:
    Educational Codeforces Round 49 (Rated for Div. 2)
    Codeforces Round #506 (Div. 3)
    multiset
    C++中substr函数的用法
    7.30 背包问题
    7.29 dp动态规划
    7.27 图论 存图 前向星 最短路 dijstra算法 SPFA算法
    7.26 搜索进阶(状压搜索,迭代加深搜索)
    7.23 深搜广搜
    7.24 二分搜索
  • 原文地址:https://www.cnblogs.com/ldy-miss/p/10179284.html
Copyright © 2011-2022 走看看