[英]Can not run the `uwsgi --ini uwsgi.ini`, with the log of `no app loaded. going in full dynamic mode`
I have bellow config of uwsgi.ini
, you can see the bellow config. 我有
uwsgi.ini
波纹管配置,您可以看到波纹管配置。
I think there is no problem with my configuration but there still can not run uWSGI success. 我认为我的配置没有问题,但是仍然无法成功运行uWSGI。
[uwsgi]
chdir=/data/lll/repo/Qn
uid=nobody
gid=nobody
module=Qn.wsgi:application
socket=/data/lll/repo/Qn/uwsgi.sock
master=true
workers=5
pidfile=/data/lll/repo/Qn/uwsgi.pid
vacuum=true
thunder-lock=true
enable-threads=true
harakiri=30
post-buffering=4096
daemonize=/data/lll/repo/Qn/uwsgi.log
then I run uwsgi --ini uwsgi.ini
. 然后我运行
uwsgi --ini uwsgi.ini
。 get the bellow traceback in uwsgi.log
: 在
uwsgi.log
获取波纹管回溯:
...
chdir() to /data/lll/repo/Qn
your processes number limit is 4096
your memory page size is 4096 bytes
detected max file descriptor number: 8192
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to UNIX address /data/lll/repo/Qn/uwsgi.sock fd 3
dropping root privileges after socket binding
dropping root privileges after plugin initialization
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 486672 bytes (475 KB) for 5 cores
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
dropping root privileges after application loading
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 4004)
spawned uWSGI worker 1 (pid: 4005, cores: 1)
spawned uWSGI worker 2 (pid: 4006, cores: 1)
spawned uWSGI worker 3 (pid: 4007, cores: 1)
spawned uWSGI worker 4 (pid: 4008, cores: 1)
spawned uWSGI worker 5 (pid: 4009, cores: 1)
seems the uWSGI unable to start up. uWSGI似乎无法启动。
my wsgi.py
config is bellow: 我的
wsgi.py
配置如下:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Qn.settings")
import django
print("django.setup()")
django.setup()
from socketio import Middleware
from qn_admin_website_chat.views import sio
django_app = get_wsgi_application()
application = Middleware(sio, django_app)
if __name__ == '__main__':
import eventlet
import eventlet.wsgi
eventlet.wsgi.server(eventlet.listen(('', 8000)), application)
This post has been around for a while, so I am sure you have found a solution one way or another. 这篇文章已经存在了一段时间,所以我相信您已经找到了一种解决方法。 But it looks like you are doing
chdir=/data/lll/repo/Qn
and then module=Qn.wsgi:application
. 但看起来您正在执行
chdir=/data/lll/repo/Qn
,然后执行module=Qn.wsgi:application
。 Did you have a Qn module inside the Qn repo? 您在Qn存储库中是否有Qn模块? Is there either
/data/lll/repo/Qn/Qn.py
or /data/lll/repo/Qn/Qn/__init__.py
? 是否存在
/data/lll/repo/Qn/Qn.py
或/data/lll/repo/Qn/Qn/__init__.py
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.