Questions tagged [uwsgi]
Questions regarding uWSGI which is a full stack for building hosting services
344
questions
0
votes
1
answer
26
views
can nginx block incoming headers as reverse proxy / uwsgi client
I am using nginx and would like to block certain incoming headers, such, that
uwsgi never receives these headers
a server / service that I proxy to will not receive them
How can I achieve this
0
votes
0
answers
76
views
Searxng nginx installation fails
Hi I'm trying to install searxng in my nginx server using the installation script (https://docs.searxng.org/admin/installation-nginx.html).
It complains that it can't find the searx module
INFO: ...
0
votes
0
answers
118
views
Permission denied: mod_wsgi - 403 Forbidden
I’m facing this forbidden error while deploying django on apache.(MacOS to vbox Ubuntu)
You can see the file permissions here. Do you have any idea how to fix it? Thanks in advance.
Currently I am ...
0
votes
0
answers
98
views
uWSGI application behind traefik
My current setup looks like:
request -> traefik (for https) -> NGINX -> uWSGI
where uWSGI is started with the following opts:
UWSGI_OPTS="--socket /tmp/uwsgi.sock \
--http 0....
0
votes
0
answers
415
views
Why does uwsgi listen queue fill up when I increase the replicas to 2?
So, I have a very basic Python Flask app with uWSGI where upon application load, a background job reads data into memory and requests just serve this data (no updates). This data is probably ...1200kB ...
1
vote
0
answers
55
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 ...
1
vote
0
answers
1k
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>, ...
0
votes
0
answers
428
views
How to add multiple ip and add sub-domain in nginx?
I was following the nginx,uwsgi with flask & docker tutorial. My nginx config file contains:
server {
listen 5000;
server_name 19X.X.X.X;
client_header_buffer_size 5M;
...
1
vote
0
answers
330
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:
...
-2
votes
1
answer
681
views
Hosting Multiple Django Websites on a VPS
I'm moving away from WordPress and into bespoke Django websites.
I've settled on Django as my Python framework, my only problems at the moment are concerning hosting. My current shared hosting ...
0
votes
1
answer
624
views
Unix socket communication with Apache 2.4.51 and Flask App using Uwsgi returning "404 Not Found"
I'm using Apache in the front as web server and running python flask application at
the back end and they communicate using Unix socket as mentioned in the link below for mod_proxy_uwsgi module and i ...
-1
votes
1
answer
911
views
centos8 nginx uwsgi socket permission denied
I've configured uwsgi and nginx to work through socket(chmod 777) which is located in user home dir, but nginx can't access the socket(13: Permission denied in error.log).
Tried moving socket to /tmp/ ...
1
vote
1
answer
1k
views
uWSGI aborts responses, loses connection to nginx
I'm running a small web application written in Python, running in uWSGI and served through nginx. There's a component that generates ZIP files for downloading, which occasionally can be quite large (...
1
vote
1
answer
177
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 ...
0
votes
0
answers
382
views
How do I configure uwsgi as a production WSGI server?
I have a flask app that I want to run using uwsgi. I am also managing the uwsgi with supervisor.
here is the my supervisor.conf file
[program:myapp]
command=/opt/python_envs/apps/bin/uwsgi --ini /opt/...
2
votes
0
answers
3k
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: ...
1
vote
1
answer
792
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=...
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" ...
0
votes
0
answers
90
views
Is it possible to define "excludes" for check-static in uwsgi settings?
I have an application which I don't want to modify.
It has multiple directories with static files which are defined as static via check-static directive in uwsgi's .ini-file. My problem is that each ...
2
votes
1
answer
3k
views
Invalid Request Block Size with Nginx and USWGI
I am trying to load balance 2 Python apps using Docker and Nginx.
App 1 is run using UWSGI and App 2 is run using default Python Server (I used default server for App 2 just for testing purposes. At ...
0
votes
0
answers
981
views
uWSGI cannot find “application” using Flask and Virtualenv
This is the error im getting using uwsgi on my webserver
*** Operational MODE: single process ***
ModuleNotFoundError: No module named 'app'
unable to load app 0 (mountpoint='') (callable not found or ...
2
votes
1
answer
1k
views
How to use UNIX domain sockets behind Apache / mod_proxy_uwsgi?
On my development system I'm running a Flask WSGI application with uwsgi and nginx. However on the production server I need to use Apache instead of nginx, so I'm trying to do that. In nginx the site ...
1
vote
1
answer
111
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 ...
0
votes
1
answer
1k
views
Why is my virtualenv not activated by uwsgi?
On a fresh install of Debian Bullseye I am unable to use the uwsgi command. It fails to load the requested virtualenv.
This is the command that fails:
uwsgi --plugins http,python3 --wsgi-file wsgi.py -...
2
votes
1
answer
902
views
uwsgi vassal does not use virtualenv
I am running a python application started by an uwsgi emperor. The application is supposed to run in a specific venv, but I cannot get that to work.
The ini file for the application specifies a venv ...
1
vote
1
answer
1k
views
HAProxy + uwsgi all connection "Connection reset by peer"
I've a problem with UWSGI + HAProxy.
for all the connections that get closed, i see this log in uwsgi file [uwsgi-http key: client_addr: 192.168.173.250 client_port: 57002] hr_read(): Connection ...
0
votes
1
answer
1k
views
Unable to connect flask app by public ip and domain using ubuntu, nginx, uwsgi
I am a beginner in web developement, trying to deploy my flask app in oracle cloud with ubuntu 18.04, nginx, uwsgi and flask.
nginx config is default.
myapp.config for server is:
server {
listen ...
1
vote
0
answers
169
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
</...
0
votes
1
answer
3k
views
flask app served by nginx uwsgi returns 502
I cannot connect to a flask app (searx search engine) served by nginx and uwsgi.
My web server shows "502 Bad Gateway nginx"
Here is my nginx error: error log: /var/log/nginx/error.log
[crit]...
0
votes
0
answers
2k
views
nginx error 500 when making api request to backend container
I am having trouble in setting up a system that consists of an nginx set up as a reverse proxy
processing https requests on a Virtual Machine that is livin on my local computer. This reverse
proxy ...
1
vote
0
answers
316
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
...
0
votes
0
answers
1k
views
/myproject.sock failed (111: Connection refused) while connecting to upstream,
Iam serving flask by nginx and uwsgi but i am getting a permission error
Iam newbie with nginx
/var/log/nginx/error.log
*1 connect() to unix:///usr/share/nginx/html/myproject/myproject.sock ...
1
vote
0
answers
285
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 ...
1
vote
0
answers
581
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 ...
2
votes
0
answers
1k
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/...
3
votes
1
answer
2k
views
uWSGI can't load config in Docker
I have a weird problem, which is probably related to my Dockerfile, but I fail to see it - I've tried different settings, but nothing helps. Here is my uwsgi.ini file:
[uwsgi]
strict = true
socket = ...
0
votes
0
answers
74
views
Nginx error upon attempting to view my website 502 Http Error
When I go to view my website.com in the browser it fails to properly load with a HTTP 502 error. When I view the logs at: /var/log/nginx/error.log I get:
2019/11/22 18:32:34 [error] 1761#1761: *25 ...
1
vote
0
answers
599
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'...
0
votes
1
answer
3k
views
VueJS sending POST to Flask fails (CORS Request blocked)
I've been following this vuejs guide and this flask guide to host my frontend and backend on a raspberry pi.
On my frontend I have this method, which sends an axios POST to the backend.
// path = ...
4
votes
2
answers
14k
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 ...
3
votes
3
answers
1k
views
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 ...
2
votes
1
answer
3k
views
Flask to uwsgi threading get stuck
im Using Python 3.7.3, uwsgi 2.0.18, (docker container image python:3-stretch)
We have development environment where we are running our code on flask and we change it to uwsgi when we test it on ...
0
votes
0
answers
530
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 ...
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 ...
0
votes
0
answers
1k
views
Why do I get a 110: Connection timed out error, white serving a flask app through nginx and uwsgi?
I am trying to serve a flask application using nginx and uwsgi, through an ubuntu docker container, while the host is also an ubuntu 18.04 OS.
This is the conf file for the nginx server, for which I ...
1
vote
0
answers
778
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 ...
2
votes
1
answer
5k
views
Nginx fails to start after boot, but works fine with a manual command
I've recently got an Ubuntu 18 server and I'm a little confused to say the least.
First: If I run sudo service nginx start or sudo systemctl start nginx, everything appears to work. My site is ...
1
vote
1
answer
392
views
uWSGI Emperor new apps are not started immediately
I run uWSGI in Emperor mode. Everything is fine and works but if i add a new myapplication.ini uWSGI needs minutes to hours bevor recognize the change and starts a new app. The Documentation says ...
1
vote
1
answer
1k
views
What does uwsgi_socket_keepalive affect when using the uwsgi protocol?
I was looking at some options to optimize for nginx with a uwsgi upstream and noticed that at the end of the entry for keepalive the docs say:
SCGI and uwsgi protocols do not have a notion of ...
2
votes
1
answer
6k
views
uwsgi won't start on Ubuntu Ubuntu 18.04.1 LTS
I am following this Askbot installation tutorial, and it goes well till the very end, when I can't start uWsgi with:
sudo systemctl restart uwsgi
Errors which I get are:
sudo systemctl restart ...