3

I'm use Ubuntu 12.04.1 on AWS EC2 Micro instance and trying to set up simple Flask app with uWSGI and nginx. And I faced something strange with uWSGI configuration.

Here is my app.conf:

[uwsgi]
socket = /tmp/tmp.sock
plugins = python27
chdir = /home/ubuntu/app
pythonpath = ..
module = app:app
virtualenv = /home/ubuntu/.virtualenvs/app

uWSGI did not create socket file after restart nor if I run it manually with uwsgi -i /etc/uwsgi/apps-enabled/app.conf, here the log:

*** Starting uWSGI 1.0.3-debian (64bit) on [Sat Mar 16 06:54:39 2013] ***
compiled with version: 4.6.3 on 17 July 2012 02:26:54
current working directory: /home/ubuntu/app
detected binary path: /usr/bin/uwsgi-core
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
The -s/--socket option is missing and stdin is not a socket.

But when I add -s argument, all works fine:

uwsgi -i /etc/uwsgi/apps-enabled/app.conf -s /tmp/tmp.sock

*** Starting uWSGI 1.0.3-debian (64bit) on [Sat Mar 16 06:56:04 2013] ***
compiled with version: 4.6.3 on 17 July 2012 02:26:54
current working directory: /home/ubuntu/app
detected binary path: /usr/bin/uwsgi-core
*** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
uwsgi socket 0 bound to UNIX address /tmp/tmp.sock fd 3
your server socket listen backlog is limited to 100 connections
*** Operational MODE: single process ***
*** no app loaded. going in full dynamic mode ***
spawned uWSGI worker 1 (and the only) (pid: 18023, cores: 1)

So, seems like uWSGI is ignoring socket option which set in app config file?


This happens only with ini-formatted config files - all ok with same configuration written in XML. Looks like a bug.

  • your uwsgi version is too old. You can try newer version with: sudo pip install uwsgi . It install uwsgi-1.4.9 on my Ubuntu 12.04.2 LTS – HVNSweeting Mar 16 '13 at 7:28
  • @HVNSweeting sad, but updating didn't help - same result for uwsgi-1.4.9 – user164908 Mar 16 '13 at 7:42
1

uWSGI expect only some extension like .ini, .xml...

Renaming your app.conf file to app.ini will solve the problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy