Django,uWSGI,gevent循环 - 如何获得上班 - 无法加载app 0(mountpoint ='') [英] Django, uWSGI, gevent loop - How to get to get to work - unable to load app 0 (mountpoint='')

查看:1161
本文介绍了Django,uWSGI,gevent循环 - 如何获得上班 - 无法加载app 0(mountpoint ='')的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我如何用uWSGI启动django。

  command = / usr / local / bin / uwsgi --loop gevent --socket 127.0.0.1:8070  - 进程2 --pp = / home / ubuntu / workspace / htFrontEnd / htdjango --wsgi-file = / home / ubuntu / workspace / htFrontEnd / htdjango / wsgi.py -b 32768  - -master --async 20 --enable-threads --listen 2048 

这是我得到的错误在日志中....



wsgi.phy的位置是正确的:/home/ubuntu/workspace/htFrontEnd/htdjango/wsgi.py

 您的内存页大小为4096字节
检测到最大文件描述符数:1024
async fd表大小:1024
为每个工作人员20个核心分配20800字节(20 KB)。
锁引擎:pthread robust mutexes
uwsgi套接字0绑定到TCP地址127.0.0.1:8070 fd 3
Python版本:2.7.3(默认,2012年8月1日,05:25:23 )[GCC 4.6.3]
Python主要解释器在0xab4ef0初始化
python线程支持启用
您的服务器套接字listen积压限制为2048个连接
***操作模式:preforking + async ***
added = / home / ubuntu / workspace / htFrontEnd / htdjango到pythonpath。
无法打开python文件= / home / ubuntu / workspace / htFrontEnd / htdjango / wsgi.py
无法加载应用程序0(mountpoint ='')(未找到callable或导入错误)
***没有应用程序加载进入全动态模式***
*** uWSGI正在多个解释器模式下运行***
产生uWSGI主进程(pid:1935)
产生uWSGI worker 1(pid:2037 ,核心:20)
产生uWSGI worker 2(pid:2038,核心:20)
***运行gevent循环引擎[addr:0x44f950] ***
超时。跳过请求。

这是我的wsgi.py文件。

  import os 
os.environ.setdefault(DJANGO_SETTINGS_MODULE,htdjango.settings)
from django.core.wsgi import get_wsgi_application
应用程序= get_wsgi_application()


解决方案

它是一个打字错误:从= / home / ubuntu / workspace / htFrontEnd / htdjango / wsgi.py和from = / home / ubuntu / workspace / htFrontEnd / htdjango中删除=(等号)p>

/ p>

Here is how I start django with uWSGI.

command = /usr/local/bin/uwsgi --loop gevent --socket 127.0.0.1:8070 --processes 2 --pp =/home/ubuntu/workspace/htFrontEnd/htdjango --wsgi-file =/home/ubuntu/workspace/htFrontEnd/htdjango/wsgi.py -b 32768 --master --async 20 --enable-threads --listen 2048

Here is the error I get in the logs....

The location of wsgi.phy is correct: /home/ubuntu/workspace/htFrontEnd/htdjango/wsgi.py

your memory page size is 4096 bytes
detected max file descriptor number: 1024
async fd table size: 1024
allocated 20800 bytes (20 KB) for 20 cores per worker.
lock engine: pthread robust mutexes
uwsgi socket 0 bound to TCP address 127.0.0.1:8070 fd 3
Python version: 2.7.3 (default, Aug  1 2012, 05:25:23)  [GCC 4.6.3]
Python main interpreter initialized at 0xab4ef0
python threads support enabled
your server socket listen backlog is limited to 2048 connections
*** Operational MODE: preforking+async ***
added =/home/ubuntu/workspace/htFrontEnd/htdjango to pythonpath.
failed to open python file =/home/ubuntu/workspace/htFrontEnd/htdjango/wsgi.py
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 1935)
spawned uWSGI worker 1 (pid: 2037, cores: 20)
spawned uWSGI worker 2 (pid: 2038, cores: 20)
*** running gevent loop engine [addr:0x44f950] ***
timeout. skip request.

Here is my wsgi.py file.

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "htdjango.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

解决方案

it is a typo:

remove the = (equal sign) from =/home/ubuntu/workspace/htFrontEnd/htdjango/wsgi.py and from =/home/ubuntu/workspace/htFrontEnd/htdjango

这篇关于Django,uWSGI,gevent循环 - 如何获得上班 - 无法加载app 0(mountpoint ='')的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆