I have configured nginx, uWSGI server for my Django application. Everything seems fine, bet when I do some requests using wrk, nginx server instantly starts to respond 502 Bad Gateway (I think uWSGI crashes). When I stop wrk, everything starts to work properly. Is there some limit, how many requests can be made on certain amount of time or something else? This is a very bad issue, since the system will crash if lots of users will use it.
My uWSGI configuration:
[uwsgi]
base = /home/user/
project = app
home = %(base)/env
module = %(project).wsgi:application
master = true
processes = 5
socket = /var/sockets/app.sock
chmod-socket = 664
uid = www-data
gid = www-data
harakiri = 600
vacuum = true
die-on-term = true
My nginx configuration:
server {
listen 8000;
server_name 127.0.0.1;
charset utf-8;
location /media {
alias /home/user/app/media;
}
location /static {
alias /home/user/app/static;
}
location / {
uwsgi_pass unix:/var/sockets/app.sock;
uwsgi_read_timeout 600;
include /home/user/app/uwsgi_params;
}
}