Questions tagged [uwsgi]

uWSGI is a fast, self-healing and developer/sysadmin-friendly application container server coded in pure C.

The uWSGI project

The uWSGI project aims at developing a full stack for building (and hosting) clustered/distributed network applications.

Mainly targeted at the web and its standards, it has been successfully used in a lot of different contexts.

Thanks to its pluggable architecture it can be extended without limits 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).

The uwsgi Protocol

The uwsgi (lowercase!) protocol is the native protocol used by the uWSGI server.

It is a binary protocol that can carry any type of data. The first 4 bytes of a uwsgi packet describe the type of the data contained by the packet.

Every uwsgi request generates an response in the uwsgi format.

Even the web server handlers obey this rule, as an HTTP response is a valid uwsgi packet (look at the modifier1 = 72).

The protocol works mainly via TCP but the master process can bind to a UDP Unicast/Multicast for The embedded SNMP server or cluster management/messaging requests.

2938 questions
244
votes
24 answers

Error: "dictionary update sequence element #0 has length 1; 2 is required" on Django 1.4

I have an error message on Django 1.4: dictionary update sequence element #0 has length 1; 2 is required It happened when I tried using a template tag like: {% for v in values %}: dictionary update sequence element #0 has length 1; 2 is…
user2575627
  • 2,451
  • 2
  • 13
  • 5
221
votes
16 answers

Possible reason for NGINX 499 error codes

I'm getting a lot of 499 NGINX error codes. I see that this is a client side issue. It is not a problem with NGINX or my uWSGI stack. I note the correlation in uWSGI logs when a get a 499. address space usage: 383692800 bytes/365MB} {rss usage:…
Tampa
  • 75,446
  • 119
  • 278
  • 425
183
votes
9 answers

uwsgi invalid request block size

I am running uwsgi in emperor mode uwsgi --emperor /path/to/vassals/ --buffer-size=32768 and getting this error invalid request block size: 21327 (max 4096)...skip What to do? I also tried -b 32768.
Kartik Rokde
  • 3,633
  • 8
  • 27
  • 33
134
votes
5 answers

What is the point of uWSGI?

I'm looking at the WSGI specification and I'm trying to figure out how servers like uWSGI fit into the picture. I understand the point of the WSGI spec is to separate web servers like nginx from web applications like something you'd write using…
d512
  • 32,267
  • 28
  • 81
  • 107
109
votes
13 answers

Nginx serve static file and got 403 forbidden

Just want to help somebody out. yes ,you just want to serve static file using nginx, and you got everything right in nginx.conf: location /static { autoindex on; #root /root/downloads/boxes/; alias /root/downloads/boxes/; …
isaacselement
  • 2,579
  • 3
  • 22
  • 23
99
votes
3 answers

WSGI vs uWSGi with Nginx

Could anyone please explain pros/cons when using WSGI VS uWSGI with Nginx. Currently i am building up a production server for the Django website which i have prepared but unable to decide whether should i go with WSGI or uWSGI. Could you please…
fear_matrix
  • 4,912
  • 10
  • 44
  • 65
89
votes
6 answers

nginx + uwsgi: -- unavailable modifier requested: 0 --

Ubuntu 12.04, nginx 1.2.0, uwsgi 1.0.3. I start uwsgi with the following command: uwsgi -s 127.0.0.1:9010 -M -t 30 -A 4 -p 4 -d /var/log/uwsgi.log On each request nginx replies with 502 and uwsgi writes to log the following line: -- unavailable…
Lisio
  • 1,571
  • 2
  • 15
  • 22
87
votes
7 answers

Rebuild uwsgi with pcre support

When running uwsgi I got the following message: !!! no internal routing support, rebuild with pcre support !!! I already have installed pcre (I think) with the following command: sudo apt-get install libpcre3 libpcre3-dev Why am I still getting…
johnmic07
  • 1,225
  • 2
  • 10
  • 14
78
votes
3 answers

Flask and uWSGI - unable to load app 0 (mountpoint='') (callable not found or import error)

I get the below error when I try and start Flask using uWSGI. Here is how I start: > # cd .. > root@localhost:# uwsgi --socket 127.0.0.1:6000 --file /path/to/folder/run.py --callable app - -processes 2 Here is my directory…
Tampa
  • 75,446
  • 119
  • 278
  • 425
75
votes
3 answers

Are a WSGI server and HTTP server required to serve a Flask app?

Setting up Flask with uWSGI and Nginx can be difficult. I tried following this DigitalOcean tutorial and still had trouble. Even with buildout scripts it takes time, and I need to write instructions to follow next time. If I don't expect a lot of…
culebrón
  • 34,265
  • 20
  • 72
  • 110
72
votes
29 answers

Why is PyMongo 3 giving ServerSelectionTimeoutError?

I'm using: Python 3.4.2 PyMongo 3.0.2 mongolab running mongod 2.6.9 uWSGI 2.0.10 CherryPy 3.7.0 nginx 1.6.2 uWSGI start params: --socket 127.0.0.1:8081 --daemonize --enable-threads --threads 2 --processes 2 I setup my MongoClient ONE…
drfence
  • 1,487
  • 2
  • 17
  • 29
70
votes
1 answer

Websockets in Flask

I'm currently researching websocket support in Python and am a bit confused with the offerings. On one hand it's possible to use Flask + gevent. On the other hand, uwsgi has socket support and at last there is an extension that bundles both uwsgi…
ruipacheco
  • 15,025
  • 19
  • 82
  • 138
61
votes
11 answers

Permission denied - nginx and uwsgi socket

Well I am currently trying to get my django application served using nginx and uwsgi. I am currently using a virtual environment to which uwsgi is installed. However I am currently getting a 502 bad gateway error when attempting to access the…
Deep
  • 2,988
  • 4
  • 34
  • 44
58
votes
12 answers

Error installing uwsgi in virtualenv

I'm trying to install uswgi in a virutal env on linux ubuntu, python 3.5.2 I do pip install uwsgi I got this error Failed building wheel for uwsgi and at the end of the installing logs *** uWSGI compiling embedded plugins *** [thread…
Alvaro B
  • 596
  • 1
  • 4
  • 7
58
votes
8 answers

Nginx error: (13: Permission denied) while connecting to upstream

I am getting this error in my nginx-error.log file: 2014/02/17 03:42:20 [crit] 5455#0: *1 connect() to unix:/tmp/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client: xx.xx.x.xxx, server: localhost, request: "GET /users…
user2497586
1
2 3
99 100