我在ubuntu 12.04上设置了uwsgi服务。
这是我正在使用的自定义配置文件:
[uwsgi]
# this is the path to the virtualenv
home = /var/www/api/webservice/current/
# this will point to the same file
paste = config:/var/www/api/webservice/production.ini
socket = /tmp/my_api.socket
gid = www-data
uid = www-data
logdate = true
master = true
harakiri = 30
limit-as = 1536
reload-on-as = 1200
no-orphans = true
log-x-forwarded-for = true
threads = 15
workers = 2
stats = /tmp/my_api_stats.socket
listen = 400
当我运行sudo service uwsgi start
时,我得到“失败”。但是/var/log/uwsgi/app/my_api.log中的日志不会显示任何错误消息。
我该怎么调试呢?
作为调试步骤,您可以从ExecStart
服务的/ etc / systemd / system unit配置中检查uwsgi
命令。尝试运行该命令,看看是否有关于错误的更多信息。
顺便说一下,你确定你的日志文件/var/log/uwsgi/app/my_api.log
是写日志的那个吗?当然,这可能是默认值,但如果不是,则应在配置中使用logto=/path/to/the/log
选项。
如果你使用的是基于debian的linux操作系统,你会在/ var / log / uwsgi / app / log中找到默认的app。
我也很难,同时调试uwsgi服务启动失败的原因。对我来说uwsgi --ini this_config_file.ini
工作得很好,但是service uwsgi start
在没有提供太多信息的情况下失败了。
也许uwsgi --ini this_config_file.ini
会帮你调试吗?