Questions tagged [uwsgi]

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

The uWSGI project

The uWSGI project aims at developing a full stack for building hosting services.

Application servers (for various programming languages and protocols), proxies, process managers and monitors are all implemented using a common api and a common configuration style.

Thanks to its pluggable architecture it can be extended to support more platforms and languages.

Currently, you can write plugins in C, C++ and Objective-C.

The “WSGI” part in the name is a tribute to the namesake Python standard, as it has been the first developed plugin for the project.

Versatility, performance, low-resource usage and reliability are the strengths of the project (and the only rules followed).

Github Docs

343 questions
3
votes
3 answers

Selinux 'var_t' base type warning

I am currently 'lost' in the CentOS Selinux forest. My setup involves setting up a WSGI socket in /var/www/demo/out which nginx uses to communicate with the UWSGI process. Whenever I request the page in my browser I get an nginx error. Why is this…
3
votes
2 answers

uWSGI and NGINX 502: upstream prematurely closed connection

I have a Kubernetes cluster which is running Django application within docker container served by uWSGI. The ingress controller is ingress-nginx (this one: https://github.com/kubernetes/ingress-nginx). Recently I did an upgrade of the whole…
Djent
  • 89
  • 4
  • 15
3
votes
1 answer

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 (according to the log file) that a reload is not…
digitaladdictions
  • 1,465
  • 1
  • 11
  • 29
3
votes
0 answers

How to fix mysql has gone away, high writeiops, switch to postgres?

We have a Django site (Django 1.4) running under NGINX and uwsgi. The site uses MYSQL 5.6.39 which runs on a separate AWS RDS instance. It runs fine for about a week but then suddenly we get the dreaded MYSQL 2006 error - MYSQL server has gone away.…
Marc
  • 151
  • 2
3
votes
1 answer

How logrotate behave when there is * and there is one explicit filename in log rotation in one path?

The question is little bit long! Let me explain with the example below. I have a log-rotation configuration file in /etc/logrotate.d/ which is used for uwsgi: "/var/log/uwsgi/*.log" "/var/log/uwsgi/*/*.log" { copytruncate daily rotate 5 …
Alireza
  • 563
  • 4
  • 8
  • 27
3
votes
3 answers

Nginx uWSGI responses truncated

I tried to write a web service as a joke today at http://dont-tread-on-memes.controversial.io. It's a flask app that serves fairly large images. The Flask app works well on its own, as does an independent uWSGI server, but when I try to plug uWSGI…
Luke Taylor
  • 151
  • 7
3
votes
1 answer

uwsgi sometimes fails to compile in Alpine Linux in a Docker container

I recently switched to Alpine Linux for my docker images, and Alpine doesn't have uwsgi-python3 plugin at the moment. Thus, I compile uwsgi during the container build with pip3 install uwsgi. For some reason, this fails every now and then without…
Ilya Semenov
  • 191
  • 1
  • 8
3
votes
2 answers

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 it looks like workers are being recycled every 20…
bodger
  • 145
  • 2
  • 6
3
votes
0 answers

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-Expires Expires Vary;. Doesnot work. I also find…
xiang
  • 33
  • 4
3
votes
1 answer

Using uWSGI's built-in load balancer vs nginx

I have a python app that is exposed through wsgi and was going to deploy it to the world. There are no static assets that are served from it. The app will be deployed to a single machine. I am going to serve the wsgi app using uwsgi and could…
dm03514
  • 191
  • 1
  • 3
  • 12
3
votes
0 answers

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 on runlevel [2345] stop on runlevel [06] …
Eugene Yarmash
  • 2,383
  • 5
  • 32
  • 54
3
votes
3 answers

504 Gateway Time-out uwsgi + nginx django application

I'm trying to run my Django application using Nginx + uwsgi, but I receive 504 Gateway Time-out after one minute of loading. My app takes time to do what needed as it searches for specific things on several websites. My nginx conf is the next one: …
Cajuu'
  • 131
  • 1
  • 1
  • 3
3
votes
0 answers

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 "./myapp/wsgi.py", line 3, in from…
user148905
3
votes
0 answers

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 { server 127.0.0.1:8989; } # Proxying…
3
votes
0 answers

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 of connections concurrently, which one of these…
Ander
  • 153
  • 5