Questions tagged [gunicorn]
A Python WSGI HTTP Server for UNIX, light and speedy. It's a pre-fork worker model ported from Ruby's Unicorn project. http://gunicorn.org
273
questions
0
votes
0
answers
26
views
I cannot send mail using python on a VPS
I have a running website on a VPS but I am unable to send mail. If I look in the supervisor logs I see the following error:
Traceback (most recent call last):
File "/home/founders/founders/lib/...
-1
votes
0
answers
74
views
change selinux policy to allow gunicorn to start for a django managed web site
How do I create a selinux policy to allow gunicorn to operate with nginx for a django managed web site? I know there's a way to do it, but don't understand selinux' arcane policy definitions --YES, I ...
0
votes
0
answers
15
views
launchd socket configuration for Gunicorn
I have the following working launchd configuration for Gunicorn (with Nginx as a proxy server):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//...
0
votes
0
answers
77
views
Error 500 with "Invalid block tag" issue
So I get the Internal Server Error message come up on my browser when I set DEBUG = False after I correctly have set up gunicorn and nginx and I'm currently in production mode.
In Debug, all is fine, ...
0
votes
1
answer
491
views
ModuleNotFoundError: No module named 'gunicorn.myapp' [closed]
I am trying to make two apps accessible on my LAN server (raspberry pi).
lab_app: this one is a very simple app, made with flask from a third party, using a sqlite3 database, which results to be a ...
0
votes
0
answers
147
views
Change server header on all endpoints (Flask + Nginx + Gunicorn)
I'm working on a Flask app that uses gunicorn and nginx and should hide its server header, so I managed to do it only for the homepage, like this:
gunicorn.conf.py
import gunicorn
gunicorn.SERVER = '.'...
1
vote
1
answer
297
views
Django + Nginx + Gunicorn - Static files not found
I'm using Django+Gunicorn+Nginx for my web application in a Ubuntu 22.04.4 server. I followed this guide until the end and my web is running in production. However, static files are not working (css, ...
0
votes
0
answers
154
views
Django: CONN_MAX_AGE persists connections, with gthread worker class of gunicorn
I am using Django, without MAX_CONN_AGE setting (default = 0), this leads to creation of connection in each request, and connection is not reused in django ORM.
This is causing multiple postgres ...
0
votes
1
answer
86
views
Does systemd require a password in the unit file in order to run gunicorn under a specific user?
I want to run gunicorn as a service on a production server and have looked at many examples of the systemd unit file which are similar to this
Description=Gunicorn instance to serve application
After=...
0
votes
1
answer
114
views
Is a GKE Ingress sufficient as a proxy for gunicorn?
I am running a Python application behind Gunicorn in a container in GKE (Google Kubernetes Engine). The application sits behind a GKE Ingress, i.e., an HTTP(S) Load Balancer. The Gunicorn ...
0
votes
1
answer
265
views
Proxy error: /var/run/rpc/xmlrpc.sock (localhost) failed
I'm inheriting this old Django project hosted on an EC2 instance. It used to run on Heroku and used a Proximo proxy in front of gunicorn. Now it just runs a systemd script with the following:
...
1
vote
0
answers
237
views
The Site cannot be reached - Docker - Gunicorn
I have have a Docker container running on Linux Machine. When I tried to access it on Browser it says
This site can’t be reached 10.xxx.xx.xx took too long to respond.
Try:
Checking the connection
...
1
vote
0
answers
159
views
nginx Failing to Serve Static Files to Flask
I've tried numerous solutions of other posts, but nothing seems to work for me, I always get a 404 error, when trying to let nginx serve static files of my flask application. On my local host server, ...
0
votes
1
answer
889
views
Dealing with Flask routing paths when deployed behind URL prefix
I have single page application build using the python Flask framework. I'm using gunicorn as the web server and I have containerised it using docker. It is deployed on Azure Kubernetes Services (aks) ...
0
votes
0
answers
317
views
SELinux on RHEL8 with Gunicorn and nginx has problems with saving file into diretory
I have Django application running on RHEL8 via Gunicorn and nginx. All works fine in case of testing with SELinux disabled. When I enable SELinux, there is a problem with saving the picture from ...
0
votes
0
answers
219
views
Which certificate files need to be passed to gunicorn for https?
I have the following files:
private.key, example.com.pem, example.com.crt, example.com.pem-full-chain,
example.com.p7b and server.csr
I am starting gunicorn using :
gunicorn -b example.com:5000 'app:...
0
votes
1
answer
989
views
Gunicorn can't bind port 80
I (want to) have a Google Cloud server running a Gunicorn server, however it refuses to bind to port 80, despite it being free.
Here's the command I'm using to start it:
gunicorn -w 4 -b 0.0.0.0:80 ...
1
vote
0
answers
579
views
100 concurrent requests to a Django-App with Gunicorn lead to "54: Connection reset by peer" and 502's
I'm hosting a Django-App which serves as an API-Endpoint. Unfortunately the App which uses the API does a lot of concurrent requests on page-load (in the realm of 80-90 requests).
Nginx is running as ...
0
votes
1
answer
220
views
Connect Redis Unix Domain Socket to Django
I have a Django website running via nginx under user www-data and gunicorn under user myuser bound at /run/gunicorn.sock.
nginx works just fine; it acts as a proxy to the gunicorn Unix domain socket. ...
0
votes
1
answer
2k
views
Gunicorn quits without notice
I'm deploying a django/nginx/gunicorn site and am following this guide while doing so. Following the subheading "Final Steps for Production Deployments", I've created a production gunicorn ...
3
votes
1
answer
147
views
get request problems while running nginx + gunicorn + django-plotly-dash
The web site is running, Gigicorn has multipule workers.
For some reason the url_calling : http://web?id=value
the id=value do not propagate coherently, (sometimes it works, but most of the time it ...
0
votes
1
answer
437
views
www subdomain works but others don't
I encountered a problem with nginx I do not understand.
I am able to correctly setup and call www.example.tech and example.tech.
However when adding another subdomain like survey.example.tld to the ...
0
votes
1
answer
1k
views
Best way to config gunicorn and nginx with django?
I am trying to deploy django with gunicorn and nginx on heroku, and i'm kinda confused with the way to config gunicorn and nginx, when i searched through internet, they usually create gunicorn.socket
[...
0
votes
1
answer
2k
views
connection refused django gunicorn nginx
I am getting following error when running search feature on my site (search feature makes api request to my api server):
2022/08/31 21:01:56 [error] 726#726: *23 connect() failed (111: Connection ...
0
votes
1
answer
912
views
after applying ssl certificate, static files aren't served anymore
My config file is located in /etc/nginx/sites-enabled is called songreccs.conf and looks like this:
server {
server_name www.songreccs.com songreccs.com;
location /static {
...
1
vote
1
answer
98
views
Nginx behind Apache
I have an apache who is hosting websites
one is 000-default.conf for www.domain1.com
another one is domain2.conf for www.domain2.com
and has a config like this
<VirtualHost *:80>
...
0
votes
0
answers
2k
views
Error 502: Deploy Django application with Gunicorn and Nginx
I have developed a web application with Django and I am trying to publish it in a virtual machine created with Azure. To do that I'm using the following software stack:
Ubuntu (20.04)
Django (3.0.7)
...
0
votes
0
answers
1k
views
how do I configure nginx to send user ip in response headers
I have an nginx server I installed on ubuntu 20.04 server.
I'm trying to get the user IP address but nginx doesn't seem to be configured to pass it.
when looking at access logs /var/log/nginx/access....
0
votes
2
answers
643
views
Hosting two different django project in the same droplet with different subdomains (NGINX, Gunicorn, ubuntu)
As the title says I want to host two different django project in the same droplet (NGINX, Gunicorn, ubuntu) with different subdomains. One will be our main site example.com. which is up and running ...
0
votes
1
answer
901
views
Not getting nginx and gunicorn running in Docker container
I am new to Docker and trying my best to figure out every bit, but seriously struggle on starting gunicorn and nginx with my Dockerfile.
Whenever I add the last four lines, the container won't boot ...
0
votes
1
answer
3k
views
Nginx redirects to http://localhost
Brief image of the situation
I can't use domain address for server_name because I can't control DNS server. I must use public IP to connect to my web server.
So I set server_name to _;, but when I ...
1
vote
1
answer
2k
views
Getting timeout errors with nginx+gunicorn application on Azure app services
Guys I need some help with my NGINX config. Right now the Django application is hosted at Azure App services, and going straight to Gunicorn works fine, but when I go trough NGINX I start getting ...
1
vote
1
answer
1k
views
Supervisor not reloading Gunicorn properly with Django project
I am using Supervisor to reload Gunicorn when pushing Django project to production :
Workflow :
" && python manage.py migrate"\
" && python manage.py ...
0
votes
0
answers
110
views
Switching from SQLite to Mysql in production causes error
I am using a digital ocean server. After switching to mysql database from sqlite, I got 502 Bad Gateway nginx/1.18.0 (Ubuntu)
This is running fine when I run the project from the terminal using ...
1
vote
0
answers
481
views
How to disable upstream buffering Nginx + Docker + Gunicorn?
I'm trying to use Nginx as proxy server between client and Gunicorn. Nginx, Gunicorn (Django) are Docker's containers. Problem is I can't disable buffering of upstream when I send large file from ...
0
votes
1
answer
1k
views
connect() failed (111: Connection refused) when trying to reach 1 of 3 apps
I have two Django apps running on my Debian server with Gunicorn.
One running on port 80(app1), the other on 84(app2). app1 is working fine. But when trying to open app2, I get a 502 Bad Gateway from ...
2
votes
1
answer
1k
views
Why is Nginx truncating the JSON streaming response?
Our stack is Client(Browser) <-> Nginx Reverse Proxy <-> Webserver(Flask+Gunicorn) <-> Golang gRPC server
The problem is when the client makes a call to the /realtimedata endpoint, ...
1
vote
0
answers
213
views
Response with and in memory file with Django and nginx
I have a piece of code that works fine on my local setup (Django embeded dev server running on Windows) but not on server (ubuntu + gunicorn + nginx)
I build an Excel file et send it from memory like ...
0
votes
1
answer
2k
views
Intermittent 500 Error caused by psycopg2.OperationalError: could not translate host name
20% of requests to our backend Django application (deployed on AWS using ECS and Postgres RDS) are throwing 500 errors. Looking at the ECS logs, various related errors are shown:
psycopg2....
2
votes
1
answer
896
views
Urls.py not updating on Django production server , which uses nginx and gunicorn
I am currently hosting a Django Webapp on an AWS EC2 instance, To run it in production mode I use NGINX and gunicorn.
The Error that I am facing is:
The production server doesnt seem to update urls.py,...
0
votes
0
answers
3k
views
Django / Gunicorn with Nginx reverse proxy - Wrong redirect to base path
I have a Django app successfully running with Gunicorn/Uvicorn, under a subpath of my domain (example.com/myapp).
The Nginx vhost looks like this:
server {
server_name example.com;
location /...
0
votes
0
answers
2k
views
PATCH request returns 404, POST and GET work
I'm working on a web application that interacts with a custom REST API. It's basically a table of data that's updated through the application. I'm trying to use the PATCH method for the updates, but ...
1
vote
1
answer
550
views
How can I setup multiple Django Apps using Supervisor (including Gunicorn and Nginx)? bind() to [::]:8090 failed (98: Address already in use)
I already deployed a Django/Wagtail App using Supervisor, Gunicorn and Nginx (on Debian Buster), so I can reach it with http://xx.xxx.xxx.xxx:8090.
/etc/nginx/sites-available/cms
server {
...
0
votes
1
answer
1k
views
Debug a Nginx vhost as a reverse proxy for a Uvicorn Python API
I have a (Python, DRF-based) API, running as a Uvicorn service on port 8002 on a Debian server.
It runs with no apparent issue, since when I do curl http://127.0.0.1:8002/videos/, I get the expected ...
1
vote
2
answers
3k
views
Gunicorn/Flask reject identical SSL certificate that works fine with Apache
What would cause a Gunicorn server running a Flask app to report a "sslv3 alert certificate unknown" error in the browser, when an Apache server running a WSGI app, using the exact same ...
0
votes
0
answers
3k
views
Curl : Recv failure : Connection Reset By Peer and Unix Socket Crash
I'm trying to set up a unix socket for gunicorn and to ping it from curl (running curl --unix-socket /run/gunicorn.sock http://www.example.com --trace-ascii dump.txt). Unfortunately, the response from ...
0
votes
1
answer
558
views
Flask on cheroot/gunicorn scalability
I have developed a HTTP API endpoint using flask which accepts json data on POST requests and sends back json response.
I have tried using multiple WSGI servers: gunicorn, cheroot, Bjoern behind Nginx ...
-1
votes
1
answer
2k
views
Nginx + Gunicorn + Flask not serving static files
I am new to Nginx and Gunicorn....
I am trying to serve flask app on certain prefix....
ex: https://myweb.com/flask/prefix/
everything works fine except it is not loading static files......
my nginx ...
0
votes
1
answer
896
views
Serving multiple socket using gunicorn and Nginx cause a NotFound error
I am trying to serve two Flask apps using Nginx as a reverse proxy. In my default.conf which I have reloaded using sudo service nginx restart I have got:
location /app2loc/ {
include ...
1
vote
1
answer
2k
views
Static files with Python, Apache (Proxy) and SSL [duplicate]
It's my first question in the community, i apologize in advance if I write something wrong
I developed an application in Python (Django) and in the quality environment I am using gunicorn to provide ...