I believe 'python' would use the system Python, where explicitly stating 'python27' forces it to use the Python 2.7 interpreter. On many systems, system Python is 2.7, but if you were using uWSGI to run a Python 3.3 application, simply using 'python' would most likely fail.
Plus, it follows the Zen of Python: Explicit is better than implicit. :) On Fri, Aug 16, 2013 at 5:04 PM, Saint Germain <[email protected]> wrote: > That's it, you're the best ! > Just for curiosity: why python27 and not just python ? > It works with just python... > > Thanks again ! > > On Fri, 16 Aug 2013 16:44:58 -0400, [email protected] wrote : > > > Greetings, > > > > I believe you simply need to add a 'plugin = python27' (assuming you > > really are using Python 2.7.x) line to your ini file to tell it which > > interpreter plugin to use. > > > > -Jon Chappell > > > > On Aug 16, 2013, at 4:44 PM, Saint Germain <[email protected]> wrote: > > > > > Hello, > > > > > > Working on Debian Testing with uwsgi 1.9.13, I have some problem > > > using uwsgi with emperor mode on a Django website. > > > > > > Everything works fine when directly specifying the ini file: > > > ********************************************* > > > uwsgi --plugin python --ini mysite_uwsgi.ini > > > [uWSGI] getting INI configuration from mysite_uwsgi.ini > > > *** Starting uWSGI 1.9.13-debian (32bit) on [Fri Aug 16 22:34:38 > > > 2013] *** compiled with version: 4.8.1 on 03 August 2013 23:17:13 > > > os: Linux-3.9-1-686-pae #1 SMP Debian 3.9.8-1 > > > nodename: system > > > machine: i686 > > > clock source: unix > > > pcre jit disabled > > > detected number of CPU cores: 4 > > > current working directory: /home/user/mysite > > > detected binary path: /usr/bin/uwsgi-core > > > your processes number limit is 23651 > > > your memory page size is 4096 bytes > > > detected max file descriptor number: 1024 > > > lock engine: pthread robust mutexes > > > uwsgi socket 0 bound to UNIX address /tmp/mysite.sock fd 3 > > > Python version: 2.7.5+ (default, Jun 2 2013, 21:26:54) [GCC 4.7.3] > > > Set PythonHome to /home/user/.virtualenvs/mysite > > > *** Python threads support is disabled. You can enable it with > > > --enable-threads *** Python main interpreter initialized at > > > 0x9784100 your server socket listen backlog is limited to 100 > > > connections your mercy for graceful operations on workers is 60 > > > seconds mapped 320000 bytes (312 KB) for 4 cores > > > *** Operational MODE: preforking *** > > > WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter > > > 0x9784100 pid: 13125 (default app) *** uWSGI is running in multiple > > > interpreter mode *** spawned uWSGI master process (pid: 13125) > > > spawned uWSGI worker 1 (pid: 13126, cores: 1) > > > spawned uWSGI worker 2 (pid: 13127, cores: 1) > > > spawned uWSGI worker 3 (pid: 13128, cores: 1) > > > spawned uWSGI worker 4 (pid: 13129, cores: 1) > > > ********************************************* > > > > > > But if I try the emperor mode, it seems that the virtualenv is not > > > recongnized: > > > ********************************************* > > > uwsgi --plugin python --emperor /home/user/mysite > > > *** Starting uWSGI 1.9.13-debian (32bit) on [Fri Aug 16 22:36:22 > > > 2013] *** compiled with version: 4.8.1 on 03 August 2013 23:17:13 > > > os: Linux-3.9-1-686-pae #1 SMP Debian 3.9.8-1 > > > nodename: system > > > machine: i686 > > > clock source: unix > > > pcre jit disabled > > > detected number of CPU cores: 4 > > > current working directory: /home/user/mysite > > > detected binary path: /usr/bin/uwsgi-core > > > *** WARNING: you are running uWSGI without its master process > > > manager *** your processes number limit is 23651 > > > your memory page size is 4096 bytes > > > detected max file descriptor number: 1024 > > > *** starting uWSGI Emperor *** > > > *** has_emperor mode detected (fd: 6) *** > > > [uWSGI] getting INI configuration from mysite_uwsgi.ini > > > *** Starting uWSGI 1.9.13-debian (32bit) on [Fri Aug 16 22:36:22 > > > 2013] *** compiled with version: 4.8.1 on 03 August 2013 23:17:13 > > > os: Linux-3.9-1-686-pae #1 SMP Debian 3.9.8-1 > > > nodename: system > > > machine: i686 > > > clock source: unix > > > pcre jit disabled > > > detected number of CPU cores: 4 > > > current working directory: /home/user/mysite > > > detected binary path: /usr/bin/uwsgi-core > > > your processes number limit is 23651 > > > your memory page size is 4096 bytes > > > detected max file descriptor number: 1024 > > > lock engine: pthread robust mutexes > > > uwsgi socket 0 bound to UNIX address /tmp/mysite.sock fd 3 > > > your server socket listen backlog is limited to 100 connections > > > your mercy for graceful operations on workers is 60 seconds > > > mapped 320000 bytes (312 KB) for 4 cores > > > *** Operational MODE: preforking *** > > > *** no app loaded. going in full dynamic mode *** > > > *** uWSGI is running in multiple interpreter mode *** > > > !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!! > > > no request plugin is loaded, you will not be able to manage > > > requests. you may need to install the package for your language of > > > choice, or simply load it with --plugin. !!!!!!!!!!! END OF > > > WARNING !!!!!!!!!! spawned uWSGI master process (pid: 13135) > > > spawned uWSGI worker 1 (pid: 13136, cores: 1) > > > spawned uWSGI worker 2 (pid: 13137, cores: 1) > > > spawned uWSGI worker 3 (pid: 13138, cores: 1) > > > spawned uWSGI worker 4 (pid: 13139, cores: 1) > > > ********************************************* > > > > > > Here is my mysite_uwsgi.ini: > > > [uwsgi] > > > chdir = /home/user/mysite > > > chdir2 = /home/user/mysite > > > module = mysite.wsgi > > > > > > home = /home/user/.virtualenvs/mysite > > > virtualenv = /home/user/.virtualenvs/mysite > > > venv = /home/user/.virtualenvs/mysite > > > pyhome = /home/user/.virtualenvs/mysite > > > env = UWSGI_VASSAL_VENV= /home/user/.virtualenvs/mysite > > > > > > master = true > > > processes = 4 > > > socket = /tmp/mysite.sock > > > chmod-socket = 666 > > > vacuum = true > > > > > > Can someone give me a hint ? > > > Or maybe a way to debug this more precisely ? > > > > > > Many thanks in advance, > > > _______________________________________________ > > > uWSGI mailing list > > > [email protected] > > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > _______________________________________________ > > uWSGI mailing list > > [email protected] > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- * Jon Chappell* [email protected]
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
