Заранее прошу прощения за, возможно, нубовский вопрос.
Сейчас Nextgis запускается через ppserve. Всё работает, но шевелится не очень быстро. Через uWSGI должно быть побыстрее, кажется.
Код: Выделить всё
user@ubuntu:~/ngw$ source env/bin/activate
(env)user@ubuntu:~/ngw$ pip install uwsgi
Код: Выделить всё
[app:main]
use = egg:nextgisweb
config = /opt/ngw/config.ini
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6543
[uwsgi]
plugins = python
home = /opt/ngw/env
module = nextgisweb.uwsgiapp
env = PASTE_CONFIG=%p
env = LANG=ru_RU.UTF-8
socket = :6543
protocol = uwsgi
chmod-socket=777
paste-logger = %p
workers = 2
threads = 4
limit-post = 7516192768
harakiri = 6000
socket-timeout = 6000
max-requests = 5000
buffer-size = 32768
Код: Выделить всё
(env) root@nextgis:~/ngw# uwsgi development.ini
[uWSGI] getting INI configuration from development.ini
open("./python_plugin.so"): No such file or directory [core/utils.c line 3684]
!!! UNABLE to load uWSGI plugin: ./python_plugin.so: cannot open shared object file: No such file or directory !!!
*** Starting uWSGI 2.0.14 (64bit) on [Thu Feb 16 15:10:15 2017] ***
compiled with version: 4.8.4 on 16 February 2017 14:59:11
os: Linux-4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016
nodename: nextgis
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /root/ngw
detected binary path: /root/ngw/env/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 7915
your memory page size is 4096 bytes
*** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers ***
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 UNIX address /tmp/ngw.socket fd 3
Python version: 2.7.6 (default, Oct 26 2016, 20:33:43) [GCC 4.8.4]
Set PythonHome to /root/ngw/env
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0xf9fcb0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 582144 bytes (568 KB) for 8 cores
*** Operational MODE: preforking ***
WARNING: QApplication was not created in the main() thread.
WSGI app 0 (mountpoint='') ready in 10 seconds on interpreter 0xf9fcb0 pid: 13909 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (pid: 13909, cores: 1)
spawned uWSGI worker 2 (pid: 13931, cores: 1)
spawned uWSGI worker 3 (pid: 13932, cores: 1)
spawned uWSGI worker 4 (pid: 13933, cores: 1)
spawned uWSGI worker 5 (pid: 13934, cores: 1)
spawned uWSGI worker 6 (pid: 13935, cores: 1)
spawned uWSGI worker 7 (pid: 13936, cores: 1)
spawned uWSGI worker 8 (pid: 13937, cores: 1)