簡體   English   中英

無法運行`uwsgi --ini uwsgi.ini`,且未加載任何日志。 進入全動態模式`

[英]Can not run the `uwsgi --ini uwsgi.ini`, with the log of `no app loaded. going in full dynamic mode`

我有uwsgi.ini波紋管配置,您可以看到波紋管配置。
我認為我的配置沒有問題,但是仍然無法成功運行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

然后我運行uwsgi --ini uwsgi.ini 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)

uWSGI似乎無法啟動。

我的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)  

這篇文章已經存在了一段時間,所以我相信您已經找到了一種解決方法。 但看起來您正在執行chdir=/data/lll/repo/Qn ,然后執行module=Qn.wsgi:application 您在Qn存儲庫中是否有Qn模塊? 是否存在/data/lll/repo/Qn/Qn.py/data/lll/repo/Qn/Qn/__init__.py

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM