UWsgi server not working properly due to interpreter mode
This is my first rodeo since uWsgi
- but after hours of trying to set it up, it hasn't been the smoothest experience.
I am running uWsgi
with Nginx
( Nginx
works fine).
I am trying to download uWsgi
using: 1)uwsgi --socket 127.0.0.1:5000 --chdir /path/to/my/django/application --wsgi-file django/application/wsgi.py --master --processes 4 --threads 2
or
2) uwsgi --ini runserver.ini
Result: none of them will properly deploy the application.
When I run the second attempt at the command, I get an output like:
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /my/django/application/directory
detected binary path: /usr/local/bin/uwsgi
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:5000 fd 3
Python version: 2.6.5 (r265:79063, Feb 27 2014, 19:56:00) [GCC 4.4.3]
Python main interpreter initialized at 0x86ac688
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 357000 bytes (348 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
failed to open python file hook_project/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: 7477)
spawned uWSGI worker 1 (pid: 7478, cores: 2)
spawned uWSGI worker 2 (pid: 7479, cores: 2)
spawned uWSGI worker 3 (pid: 7480, cores: 2)
spawned uWSGI worker 4 (pid: 7481, cores: 2)
Nginx configuration
upstream django {
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket
server xxx.xxx.xxx.xxx:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 8003;
# the domain name it will serve for
server_name xxx.xxx.xxx.xxx; # substitute your machine IP address or FQDN
access_log /var/www/nginx_log/access.log;
error_log /var/www/nginx_log/error.log;
charset utf-8;
location /static {
# the Django project static files
alias /path/to/django/static;
}
location / {
uwsgi_pass django;
include /etc/nginx/uwsgi_params; # or the uwsgi_params you installed manually
}
# max upload size
client_max_body_size 75M; # adjust to taste
}
Can anyone suggest why my app is not loading at all and uwsgi is not working when loading django app?
source to share
No one has answered this question yet
See similar questions:
or similar: