librelist archives

« back to archive

flask website getting nginx, uwsgi error

flask website getting nginx, uwsgi error

Kundan Singh
2013-05-27 @ 09:40
I deployed my flask app successfully using nginx, uwsgi on Ubuntu.
Everything worked fine and site was running smoothly.

But after few hours it showed a *Nginx 502 Bad Gateway error *and went
I check log it says:

[uWSGI] getting INI configuration from myflaskapp.ini
/usr/lib/uwsgi/plugins/ cannot open shared object file: No
such file or directory [WARNING] option "app" is deprecated: use the more
advanced "mount" option open("/var/log/uwsgi/myflaskapp.log"): Permission
denied [utils.c line 250]
removed uwsgi instance myflaskapp.ini *** has_emperor mode detected (fd: 6)

My myflaskapp.ini is:

*base = /var/www/*
*app = runserver  *#my app's starting file
*# Generic Config*
*plugins = http,python*
*home = %(base)/venv *#virtualenv where flask is installed
*pythonpath = %(base)*
*chmod-socket = 666*
*socket =*
*module = %(app)*
*callable = app  *
*logto = /var/log/uwsgi/%n.log*

With same configuration the site worked fine. But now its offline with
above error in the log file.

Why this is happening? Anything to do with *callable* variable ?

Please suggest?