Skip to main content

Questions tagged [uwsgi]

Questions regarding uWSGI which is a full stack for building hosting services

Filter by
Sorted by
Tagged with
91 votes
2 answers
36k views

Why do I need nginx when I have uWSGI

There are many tutorials on how to configure nginx to cooperate with uWGSI when I want to deploy Django application. But why do I need nginx in this kit? uWSGI itself can serve WSGI Python ...
user983447's user avatar
  • 1,167
46 votes
5 answers
51k views

How do I make uWSGI restart when a Python script is modified?

Can't remember where, but I read uWSGI can reload itself like Django development server when a project script is modified. I can't find that in the docs, nor in the internets. How can I do this? I ...
culebrón's user avatar
  • 575
17 votes
2 answers
23k views

Wiring uWSGI to work with Django and nginx on Ubuntu 16.04

I am trying to follow this tutorial to setup uWSGI with Django and nginx on Ubuntu16.04. It all works fine up until the very last step (oh the irony...) where I try to execute this command: sudo ...
Vlad Schnakovszki's user avatar
14 votes
4 answers
30k views

How to stop uwsgi when no pidfile in config?

I've just installed uwsgi by pip install uwsgi in a virtual env. In "ini" file I used: socket = 127.0.0.1:3000 # no pidfile option And run uwsgi --ini config.ini But how to stop this instance of ...
Sergey's user avatar
  • 714
14 votes
2 answers
26k views

how to do a graceful uwsgi reload via bash script?

I have a django application which is executing a bash script. I require the nginx server to restart so I run /etc/init.d/nginx reload which works great. I have been using restart uwsgi for uwsgi but I ...
darren's user avatar
  • 243
13 votes
1 answer
8k views

What does the --master option ACTUALLY do in uwsgi?

While the uwsgi documentation is perhaps fine for someone already familiar with server administration, it is definitely not so helpful for someone trying to learn it. I hope someone can help out with ...
Mads Skjern's user avatar
12 votes
3 answers
16k views

Different Python versions under the same uwsgi Emperor?

I'm running an uwsgi Emperor with various Vassals that each serve a specific Python app from a different virtualenv. Since uwsgi was compiled with it's own Python 2.7 interpreter, trying to use a ...
Jaap Joris Vens's user avatar
9 votes
1 answer
6k views

uWSGI Returning Empty Response

I have a Django site which I am trying to server via uWSGI. I have started the server like so: uwsgi --emperor . Ctrl+Z bg 1 (There are two .ini files which point to the test version and production ...
d4nt's user avatar
  • 265
9 votes
3 answers
9k views

uwsgi queue of socket message flood?

I found my website unresponsive and I see a ton of *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (101/100) *** *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (...
user299709's user avatar
8 votes
1 answer
14k views

Error 2006: MySQL server has gone away

I'm running a Python Pyramid app on a CentOS server using uWSGI and nginx. I'm using SQLAlchemy as an ORM, MySQLdb as the API, and MySQL as a database. The site hasn't gone live yet, so the only ...
Theron Luhn's user avatar
8 votes
3 answers
24k views

uWSGI and python virtual env

I'm trying to use uWSGI with a virtual env in order to use the Trac bug tracker on it. I've installed system-wide uwsgi via pip. Next, I've installed trac in a virtualenv $ virtualenv venv $ . venv/...
Nicolas Appriou's user avatar
8 votes
1 answer
2k views

How do I get an aggregate of all the stats from all uWSGI vassals using uwsgitop?

TL;DR Can anyone tell me how I may get uwsgitop to monitor all of my vassals in my emperor-vassal setup in one shot? I have an emperor-vassal setup for my uWSGI server, and I need to monitor all my ...
Anish Ramaswamy's user avatar
7 votes
2 answers
42k views

uWSGI cannot find "application" using Flask and Virtualenv

Using uWSGI to serve a simple wsgi app, (a simple "Hello, World") my configuration works, but when I try to run a Flask app, I get this in uWSGI's error logs: current working directory: /opt/python-...
skyler's user avatar
  • 465
7 votes
3 answers
23k views

uwsgi.ini configuration for python apps

So I am experimenting with uWSGI and liking it a lot. I have a question regarding the use of its .ini file though. Is it possible to calculate values for its .ini configuration parameter dynamically?...
Calvin Cheng's user avatar
  • 1,176
7 votes
1 answer
19k views

Unable to load configuration from uwsgi

Since yesterday I have been wrestling with this problem: unable to load configuration from uwsgi When I google it, nothing comes up. I am trying to run UWSGI under nginx with a very simple uwsgi.ini ...
J.Zil's user avatar
  • 1,123
7 votes
1 answer
9k views

uWSGI won't start with systemd under Ubuntu 16.04

I'm in the process of doing a somewhat painful migration of our staging and production servers from Ubuntu 12.04 to 16.04. I'm testing the migration on staging and it is mostly working, except for ...
mathew's user avatar
  • 213
7 votes
2 answers
23k views

Django doesn't find CSS files for admin pages using uWSGI

Even if I followed the official instructions, when I start a Django test site using uWSGI, CSS files for the admin interface are not loaded. If I open the URL of a CSS file, for example http://...
Marco Sulla's user avatar
7 votes
4 answers
36k views

ubuntu + nginx + uwsgi + django No Python application found

I am trying to setup my server with a nginx to uwsgi to django stack, but I am having problems with the uwsgi part. When I run uwsgi and pass in all the parameters on the command line, it works ...
OpIvy's user avatar
  • 113
7 votes
2 answers
7k views

uwsgi processes * threads = maximum simultanous connections?

We are using uwsgi to serve the python app behind nginx. Can I hope that the theoretical maximum of simultaneously served client connections is equal to uwsgi processes * threads? We are using ...
saabeilin's user avatar
  • 439
7 votes
3 answers
12k views

Nginx cannot see unix socket

UPDATE: I saw questions related to the /tmp directory, and a comment mentioned moving the socket out of /home as well. It didn't fix the problem. (Additional updates at bottom of post) I have a ...
Ajacmac's user avatar
  • 116
7 votes
0 answers
2k views

UWSGI SIGINT/SIGQUIT received

I'm trying to use nginx with uwsi. I wrote uwsgi ini file and test it with uwsgi --ini site.ini Everything works fine. But when I try to run the site I got the following error (from log file): *** ...
Paul R's user avatar
  • 171
7 votes
1 answer
5k views

Python Threads and uWSGI Harakiri

I have a webapp that is using an API built on nginx, uWSGI, and Django. Recently I have been seeing a lot of harakiris on a particular API call which does some quick processing and then spawns a few ...
jmetz's user avatar
  • 181
7 votes
0 answers
2k views

ImportError: No module named flask - uwsgi and buildout

uWSGI config: <uwsgi> <module>app_wsgi:app</module> <pythonpath>./src</pythonpath> <socket>/tmp/uwsgi.sock</socket> <pidfile>/tmp/uwsgi....
Pavel Paulau's user avatar
6 votes
2 answers
12k views

Copy and deliver a request to another nginx server for real traffic testing

I have a Flask web service which runs on uwsgi+nginx and it works well. I have another development version of the service which runs on another server. It also runs on uwsgi+nginx. What I want to do ...
Younggun Kim's user avatar
6 votes
4 answers
4k views

Comet with uwsgi and nginx, how to turn off the output buffer?

How can I prevent Nginx from buffering the output of my uwsgi app? For my comet style application I'm using long polling and the requests are now buffered. I tried to reduce the size of the buffers, ...
Peter Smit's user avatar
  • 1,689
6 votes
2 answers
11k views

"ImportError: No module named flask" - Trouble with nginx + uWSGI + Flask in a virtualenv setup

I got nginx + uWSGI running on localhost inside a virtualenv with a simple hello world program, but I get this error when I replace the hello world with a simple Flask app: File "./...
vjk2005's user avatar
  • 175
6 votes
1 answer
2k views

Reload and evil-reload in uwsgi config

What is the difference between reload-on-as and evil-reload-on-as options in uwsgi config? I use reload-on-as and uwsgi worker still consumes unlimited memory and reloads when task is finished. I need ...
Raz's user avatar
  • 163
6 votes
1 answer
10k views

uWSGI permissions issue

I'm trying to set up a chef recipe that will get my site running and everything seems to be working fine except for uWSGI which is giving me the following error: *** has_emperor mode detected (fd: 6) ...
Nalum's user avatar
  • 259
6 votes
4 answers
8k views

Ubuntu 11.10 with Nginx and uWSGI

I'm trying to get a LNP [Linux Nginx Python] stack (is that even a thing? heh) going, but I'm having some difficulties. A lot of blog posts and documentation on doing this seems to revolve around ...
devians's user avatar
  • 223
6 votes
2 answers
11k views

I can't run uwsgi as regular user

I want to run uwsgi server as www user, but if I write: uwsgi --socket $SOCKET --chmod-socket 666 --pidfile $PIDFILE --daemonize $LOGFILE --chdir $CHDIR --pp $PYTHONPATH --module main --post-...
atomAltera's user avatar
5 votes
3 answers
22k views

Nginx & uWSGI: ImportError: No module named site

I'm receiving an error: ImportError: No module named site according to my uWSGI log. test_proj.ini: [uwsgi] chdir = /home/%n/app module = %n.wsgi home = /home/%n/app/venv master = true processes = ...
koralarts's user avatar
  • 261
5 votes
1 answer
15k views

Running (and monitoring) nginx with supervisord

I will start with my use case, since I very well may not be using the correct tools for this job. Please let me know if I am going about this all the wrong way use case: I have a CentOS server ...
Brian Leach's user avatar
5 votes
3 answers
23k views

nginx failed (13: Permission denied) uwsgi (502 bad gateway)

I am having trouble running my application on a new DigitalOcean droplet. The machine runs CentOS 6.5 My /etc/nginx/nginx.conf user nginx www-data; worker_processes 1; error_log /var/log/nginx/...
Brian Leach's user avatar
5 votes
1 answer
13k views

nginx + uwsgi - what is serving static files?

I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app. server { listen 80; server_name test.myapp.com www.test.myapp....
reptilicus's user avatar
5 votes
3 answers
10k views

Docker how to Django + uwsgi/gunicorn + nginx?

I can't get my head around on what's the "correct" way to deploy a Django project that uses uwsgi/gunicorn (I haven't decide yet what to use, probably uwsgi since it has better performances, ...
EsseTi's user avatar
  • 257
5 votes
2 answers
16k views

Correct number of uWSGI processes?

On a 4-core box which scenario makes the better setup: 4 uWSGI processes with a deep queue to handle requests 8 uWSGI processes with a deep queue As many many processes as the server's memory ...
Jason Christa's user avatar
5 votes
2 answers
7k views

Side effects of setting max-requests on uwsgi config

In order to try and reduce memory usage on our web server, I've had to set the max-requests property on my uwsgi config to 50. What are the down sides of this? We've got 10 workers on the site and ...
bodger's user avatar
  • 165
5 votes
1 answer
22k views

How do I debug this Nginx to uWSGI timeout?

I'm running a database-backed web site that receives very little traffic. However, once or twice day, a request will timeout and I'll see this (or a similar) error in Nginx's error.log: 2013/06/13 18:...
skyler's user avatar
  • 465
5 votes
2 answers
17k views

nginx works on LAN IP but not on public IP

I have setup a nginx web server with uwsgi to host my flask app. When I access it through the LAN ip (192.168.1.x) I get the website just fine but when I access it through my public IP i am greeted ...
david doyyer 32's user avatar
5 votes
1 answer
6k views

nginx+ uwsgi gives 502 Bad Gateway

I used this guide to set it up and it was working to server my django app for a while, but after adding a new django module, without touching any of the nginx or uwsgi configs, now the server leads to ...
alfish's user avatar
  • 3,177
5 votes
1 answer
3k views

Analyze uwsgi strace log to find out why it takes high CPU usage

I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab ...
chenxee's user avatar
  • 151
5 votes
2 answers
2k views

Has anyone used uwsgi nginx and django for a high-load environment?

I was wondering if anyone has used uwsgi with nginx to serve a high-load django site before. If so, did they have any problems?
kkubasik's user avatar
  • 209
4 votes
2 answers
4k views

Plain uWSGI error: uwsgi_response_write_body_do() TIMEOUT

This looks like a well-known issue with Nginx+uWSGI timeouts, but my setup is different and I couldn't find information about it. I run a Flask app on uWSGI, on http protocol (not sockets). When I ...
adamczi's user avatar
  • 153
4 votes
1 answer
6k views

Python uWSGI logs have no read permissions

I am running a Python Flask server on uWSGI over an EC2 Ubuntu 14.04 LTS. The server is configured as follows: [uwsgi] http-socket = :9000 plugin = python wsgi-file = /path/to_wsgi.py ...
Adam Matan's user avatar
  • 13.7k
4 votes
2 answers
17k views

Nginx 502 bad gateway runing django in uwsgi

I tryed to restart a project in production and it stoped working. This is a django==1.5.1 and django-cms==2.4.1 project. I restarted because I've updated the project from django==1.4.1 to django==1.5....
Mauricio's user avatar
  • 263
4 votes
1 answer
3k views

Getting pypy to run in uwsgi?

I'm trying to setup uwsgi to use pypy following what is posted here, using the build PyPy support as a plugin method. http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html I have seemed to manage to ...
monkut's user avatar
  • 255
4 votes
1 answer
3k views

Serving django with nginx and uWSGI

I followed this post to serve my django project. The project runs well with manage.py runserver and I want to set it up for production. Here are my setting files: nginx.conf: upstream django { ...
Terry's user avatar
  • 45
4 votes
1 answer
6k views

UWSGI can't import module 'mysite' with nginx and flask

I'm new to using uwsgi and nginx and I haven't been able to figure out why I am getting this error from uwsgi: ImportError: No module named mysite unable to load app 0 (mountpoint='my_ipaddr|') (...
Mark Berger's user avatar
4 votes
1 answer
3k views

UWSGI and NGINX for Python Apps on Ubuntu 11.10

I am trying to find an optimal way to set up my server to use NGINX and UWSGI to serve python applications. The following has worked so far: Initial setup: sudo apt-get install nginx uwsgi uwsgi-...
knpwrs's user avatar
  • 429
4 votes
1 answer
3k views

Restart Django/uWSGI vassal in uWSGI emperor mode

I am running a django site using uWSGI in emperor mode. I have found that while touching the uwsgi.ini file for a specific application does indeed cause the emperor process to reload that vassal (...
digitaladdictions's user avatar

1
2 3 4 5
7