Questions tagged [uwsgi]

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

116 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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
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
4k 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
4 votes
0 answers
133 views

Is there a way to "unset" options in uWSGI config files?

Let's say my config (uwsgi.ini) looks like: # can run just by uwsgi uwsgi.ini [uwsgi] # put all common elements here (can be over-ridden) http = :8090 wsgi-file = ./test.py master = 1 processes = 4 ...
Gerrat's user avatar
  • 185
4 votes
0 answers
763 views

Show config of running UWSGI instance

I have an instance of UWSGI that is getting it's config from an INI file. Everything seems fine, except it does not seem to be accepting the buffer-size config option properly. I have it set to ...
user3113357's user avatar
4 votes
0 answers
3k views

UWSGI is not creating my socket

So, i'm getting an error because my .sock file is not being created by uwsgi. I'm also running a VB with vagrant. my uwsgi.ini [uwsgi] master = true pidfile = /tmp/uwsgi-%n.pid workers = 12 enable-...
user3646167's user avatar
4 votes
1 answer
2k views

Supervisor cannot correctly stop uwsgi

Supervisor can start uwsgi but after stopping uwsgi, when i try to start it again I get this error: 2014-03-16 08:38:34,249 DEBG 'app' stderr output: ...
J.Zil's user avatar
  • 1,123
4 votes
0 answers
2k views

Ubuntu Locales Incorrect for Python Application

I have a NGINX -> UWSGI -> Django(python) stack installed on an Ubuntu AMI on Amazon EC2. I've run into a problem when accessing a file with unicode characters in the name. The exact output from the ...
OpIvy's user avatar
  • 113
4 votes
0 answers
1k views

uwsgi through supervisor too many open files

I have uWSGI set up through supervisor on a ubuntu 12.04 box and lately I noticed that when trying to tail the logs (all the logs in that user account) I get message that too many files opened , uWSGI ...
APZ's user avatar
  • 964
4 votes
1 answer
592 views

mongo and app server cpu

The beginning: We are using uwsgi and I decided to switch our configuration to use more workers/processes. Why: We have been seeing a traffic increase lately and in my tests with apache benchmark, ...
tonyl7126's user avatar
  • 213
3 votes
0 answers
4k views

Nginx converts POST Request to GET request while proxy_pass

I am having 3 Server: A, B, C. Details are: Server A: NGINX Server, URL: https://test1.example.com Server B: NGINX Server hosting NodeJS Web Application, URL: http://test2.example.com Server C: ...
Amarjeet Sharma's user avatar
3 votes
0 answers
743 views

How to config nginx and uwsgi to cache a url any way?

Update2: add uwsgi_ignore_headers Cache-Control Set-Cookie X-Accel-Expires Expires Vary; and problem solved. Thanks everyone. Update: I tried uwsgi_ignore_headers Cache-Control Set-Cookie X-Accel-...
xiang's user avatar
  • 33
3 votes
0 answers
277 views

uWSGI won't start via Upstart, but starts ok from the console

I'm trying to make uWSGI run on boot using Upstart on a Vagrant box. So I've created /etc/init/uwsgi.conf with the following contents: # simple uWSGI script description "uwsgi tiny instance" start ...
Eugene Yarmash's user avatar
3 votes
0 answers
5k views

uwsgi and "No module named django.core.wsgi"

On a fairly vanilla FreeBSD system without virtualenv, I'm having trouble getting uwsgi to work with Django. Attempting to run generates this error: Traceback (most recent call last): File "./...
user avatar
3 votes
0 answers
2k views

Pyramid + Nginx + uWSGI Server 500 Errors

I have a uWSGI application written in Python using the Pyramid framework. Nginx is configured like below (I left out a few bits, but I don't think they will matter): upstream uwsgicluster { ...
Jeremy Allen's user avatar
3 votes
0 answers
1k views

uWSGI vs Twisted Matrix

uWSGI can be configured in ashyncronous mode same as Twisted Matrix, but has anyone tried to compare these to servers in terms of performance? If we need to develop a Python web app handling thousands ...
Ander's user avatar
  • 153
3 votes
0 answers
707 views

NGINX and OpenStack Horizon?

I recently update our web infrastructure to use NGINX instead of our Apache servers. Now, I'm also operating an OpenStack Infrastructure and I was wondering if there is a state of the art way to ...
Dr I's user avatar
  • 975
3 votes
1 answer
3k views

Restart single uWSGI application (when it's in emperor mode)

I'm running uWSGI in emperor mode to host a bunch of Django sites based on their individual configs. These are supposed to update when it detects a change in the config file and this largely works ...
Oli's user avatar
  • 1,809
2 votes
0 answers
2k views

NGINX (111: Connection refused) error while connecting to upstream

I am setting up a configuration for NGINX but I am constantly getting the following error: 8#8: *698 connect() failed (111: Connection refused) while connecting to upstream, client: <IP1>, ...
Japkeerat Singh's user avatar
2 votes
0 answers
1k views

Nginx + uWSGI + Flask Connection Reset

Problem I have a Flask app deployed using Elastic Beanstalk's "Single Container Docker" platform (latest revision 3.2.5 at the time of writing), with an "Application Load Balancer" ...
jlucier's user avatar
  • 121
2 votes
0 answers
2k views

Nginx - UWSGI 504 gateway timeout

I saw lots of topics of nginx 504 error , but non if them solved this. Im using nginx , uwsgi on 1 machine to run Django application . i tried to add these config line at the end of /etc/nginx/...
Mehdi bahmanpour's user avatar
2 votes
0 answers
3k views

What to set uwsgi uid and gid to?

I'm trying to have nginx connect to a uwsgi socket on FreeBSD. I've set the socket to 666 but whenever I issue a request in my browser I can see the following in my nginx logs: 2017/12/12 11:34:04 [...
ruipacheco's user avatar
2 votes
0 answers
4k views

Systemd Unit file for uWSGI Failure

Using Flask, NGINX, and uWSGI I have setup successfully setup an app that I send and receive text messages through Twilio. Everything is working perfect, except that it is running under my personal ...
Trinitrogen's user avatar
2 votes
0 answers
2k views

Didn't receive any response from local server in the machine

So I've server linux using NGIX with docker and many Applications django with UWSGI. So I need to create a job to execute inside a container of docker. This jobs will do a request to a some url of ...
Guilherme Soares's user avatar
2 votes
0 answers
2k views

Weird 502 responses of AWS ELB

My website suddenly failed to work this afternoon, responding every request with 502. I've set up 3 backend instances behind ELB, each with Nginx installed. At first, I suspected there's something ...
Satoru.Logic's user avatar
2 votes
2 answers
3k views

uwsgi starts and works from console but doesn't want to with config file

I've got an issue with uwsgi. When I start uwsgi from conole: uwsgi --socket 127.0.0.1:5555 --chdir /var/www/proj/smth/ --wsgi-file /var/www/.../rest_api/wsgi.py & it shows web pages and ...
Tomas Morgan's user avatar
2 votes
0 answers
2k views

uwsgi + nginx + flask: upstream prematurely closed after file is downloaded

I created an endpoint on my flask which generates a spreadsheet from a database query (remote db) and then sends it as a download in the browser. Flask doesn't throw any errors. Uwsgi doesn't complain....
user299709's user avatar
2 votes
0 answers
1k views

How to deploy django with uWsgi and nginx on CentOS

My version of Django is 1.6.3 I downloaded uwsgi-2.0.4. Someone says installing uwsgi with command make while someone use python setup.py build. What exactly is the difference? I saw a tutorial that ...
Crayon's user avatar
  • 21
2 votes
0 answers
4k views

uwsgi complains about python application not found

looks like quite common with uWSGI application, but still can't find any valuable solution. I ma working on ubuntu 12.04 with uwsgi 1.0.3 and python2.7 Here is my config.ini file: [uwsgi] uid = ...
philippe's user avatar
  • 2,383
2 votes
0 answers
255 views

AssertionError when using uwsgi with pypy with the sample test app

I'm trying to get the sample pypy test hello world application to run using uwsgi with pypy. I've attempted to build uwsgi with the pypy plugin (using python uwsgiconfig.py --plugin plugins/pypy) and ...
monkut's user avatar
  • 255
2 votes
0 answers
4k views

upstream timed out (110: Connection timed out) while reading response header from upstream

For some reason, I am getting this error whenever I am running a query on my server. On my local setup, this query takes around 7-8 seconds to return, but it keeps timing out on my actual server. ...
abisson's user avatar
  • 121
2 votes
0 answers
825 views

How to use Redis as a cache backend for uwsgi_cache in Nginx

I'm using Nginx with HttpUwsgiModule and i want to perform caching. I know that there is a uwsgi_cache which can be used to cache pages on the local file system. But i want to use Redis to cache pages ...
Ali's user avatar
  • 131
2 votes
0 answers
2k views

How to tell uWSGI to prefer processes to threads for load balancing

I've installed Nginx + uWSGI + Django on a VDS with 3 CPU cores. uWSGI is configured for 6 processes and 5 threads per process. Now I want to tell uWSGI to use processes for load balancing until all ...
raacer's user avatar
  • 228
2 votes
0 answers
11k views

Nginx/uWSGI - upstream prematurely closed connection while reading response header from upstream

I've got an Ubuntu server configured with Nginx and uWSGI to serve Django which was setup and working with the default start page yesterday. All I have done since is install MySQL and later ...
markwalker_'s user avatar
2 votes
1 answer
736 views

setup Nginx, uwsgi for RAILS app on non-root location

I've set up and run a RAILS app (graylog2), and the below config made it work for root location: server { server_name www.mydomain.com; location / { gzip off; uwsgi_modifier1 ...
HVNSweeting's user avatar
2 votes
1 answer
839 views

Application reports timeouts. However nginx has no record or log

We are serving Django via nginx/uwsgi. We use AWS ELB behind a VPC. This is a webservice to Mobile clients. We had reports of timeouts during development so we have added a concept of a request_id ...
semarjt's user avatar
  • 21
1 vote
0 answers
240 views

Handling a deployment in prod with in memory data with uwsgi & kubernetes

I'm in a bit of a bind here and I'm looking for pointers as to how to best manage my situation: So, I have a Flask app with uwsgi and I'm deploying this to Kubernetes with 2 pods. UWSGI configuration ...
Saturnian's user avatar
  • 111
1 vote
1 answer
608 views

What's the advantage of uwsgi protocol over http for Apache proxying?

I've just set up a couple of WSGI apps behind an Apache server proxying to uwsgi using UNIX sockets on the same host. The generally advertised method to do that seems to be like this: Apache config: ...
musbur's user avatar
  • 203
1 vote
1 answer
252 views

How to tell nginx to honor backend's cache? uWSGI

There's a similar question but solution there doesn't work for me. We have nginx and uWSGI ad backend. We need nginx to cache the backend response according to what is in the response header. For ...
Putnik's user avatar
  • 2,327
1 vote
1 answer
1k views

UWSGI block incoming connections when all threads are busy

I have a simple UWSGI app put behind a LB with the following .ini config [uwsgi] socket=0.0.0.0:5071 chdir = src/ wsgi-file = uwsgi.py processes=2 threads=1 protocol=http plugins=python exit-on-reload=...
Constantin's user avatar
1 vote
1 answer
139 views

uWSGI on ubuntu 18 suddenly fails when --never-swap specified

I use uWSGI on ubuntu 18 (18.04.5 LTS). Very recently this stopped working - I'd get this error on startup: Fatal Python error: Cannot recover from MemoryErrors while normalizing exceptions. Nothing ...
Rich B's user avatar
  • 11
1 vote
0 answers
220 views

Multiple "Location" sections with different handlers aren't combined anymore in apache2 after upgrade

I have a website with the following configuration: <VirtualHost *:80> ServerName example.it <Location /> SetHandler uwsgi-handler uWSGISocket /var/sitedir/moin.sock </...
Pietro Battiston's user avatar
1 vote
0 answers
364 views

uWSGI in emperor mode Nginx can't access socket

But when I do it in single mode then it runs just fine. emperor.ini uid = www-data gid = www-data #exec-asap = mkdir -p /var/run/uwsgi #exec-asap = chown -R www-data:www-data /var/run/uwsgi ...
133794m3r's user avatar
  • 155
1 vote
0 answers
372 views

nginx + uWsgi is not using it's maximum capability. 90% workers remain idle all the time

I have deployed my Django application using nginx + uwsgi. I have also implemented micro caching and made other changes by following this article (Nginx 10k concurrent connections). Now I am using ...
Ankit Rastogi's user avatar
1 vote
0 answers
683 views

pip3 install wsgi can't find openssl libraries on QNAP

When try to install uwsgi via pip3, it cannot find some openssl libraries, though I think they are installed. In similiar issues it was recommended to install libssl-dev but the package manager I am ...
Lukas's user avatar
  • 111
1 vote
0 answers
643 views

Should I avoid CORS when building an SPA with backend API hosted on the same server?

I've stumbled upon this question and had the thought that my application should not require CORS, since it is hosted on the same server (a raspberry pi). However, since CORS is a security "feature" I'...
HackXIt's user avatar
  • 21
1 vote
0 answers
712 views

Uwsgi/nginx unix socket refusing connections

I have a python project that I am trying to serve with uWSGI and Nginx. I'm trying to connect the two with a Unix IPC socket (debian stretch), but the socket refuses connections whenever Nginx tries ...
uwsgiissues's user avatar
1 vote
0 answers
1k views

nginx + uwsgi + django 502 bad gateway on aws ec2

I have successfully installed nginx and uwsgi on aws ec2 instance. But on hitting the public IP its showing "502 bad gateway". Though both nginx and uwsgi server status is running and active. The ...
Jatin Goyal's user avatar
1 vote
0 answers
882 views

how to set and test nginx uwsgi_buffer_size

I have a nginx+uwsgi setup to deploy a django app. I noticed that when using g+ authentication the response from the django app has a dimention that is growing month after month. I'm reading the uwsgi ...
Alessandro Dentella's user avatar