uwsgi启动失败但不记录任何错误

问题描述 投票:2回答:3

我在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中的日志不会显示任何错误消息。

我该怎么调试呢?

linux ubuntu uwsgi
3个回答
3
投票

作为调试步骤,您可以从ExecStart服务的/ etc / systemd / system unit配置中检查uwsgi命令。尝试运行该命令,看看是否有关于错误的更多信息。

顺便说一下,你确定你的日志文件/var/log/uwsgi/app/my_api.log是写日志的那个吗?当然,这可能是默认值,但如果不是,则应在配置中使用logto=/path/to/the/log选项。


2
投票

如果你使用的是基于debian的linux操作系统,你会在/ var / log / uwsgi / app / log中找到默认的app。

我也很难,同时调试uwsgi服务启动失败的原因。对我来说uwsgi --ini this_config_file.ini工作得很好,但是service uwsgi start在没有提供太多信息的情况下失败了。


1
投票

也许uwsgi --ini this_config_file.ini会帮你调试吗?

© www.soinside.com 2019 - 2024. All rights reserved.