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

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Setting up multiple instances on a single server

I've made a business management software. It runs on Django - Gunicorn - PostgreSQL - Debian - Nginx - Amazon Lightsail. I want to move it to a server I am setting up in my basement on Dell R620. I ...
user avatar
  • 115
1 vote
1 answer
49 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> ...
user avatar
0 votes
0 answers
355 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) ...
user avatar
0 votes
0 answers
160 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....
user avatar
  • 101
0 votes
2 answers
82 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 ...
user avatar
0 votes
0 answers
53 views

How to proxy pass a Gunicorn App using MS IIS over https?

I have a Gunicorn app in a Linux server behind a DMZ that I need to proxy pass with MS IIS. The following diagram explains the configuration The problem I experiencing is with the transformation URLs ...
user avatar
  • 19
0 votes
1 answer
225 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 ...
user avatar
  • 159
0 votes
1 answer
143 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 ...
user avatar
  • 105
1 vote
1 answer
362 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 ...
user avatar
  • 11
1 vote
1 answer
212 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 ...
user avatar
0 votes
0 answers
55 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 ...
user avatar
1 vote
0 answers
121 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 ...
user avatar
  • 11
0 votes
1 answer
178 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 ...
user avatar
  • 1
2 votes
1 answer
339 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, ...
user avatar
0 votes
0 answers
388 views

Getting a "403 access denied" after following tutorial

I followed the tutorial located here, Everything seemed to go as the tutorial said it would - except now I'm getting a 403 Forbidden error. I have nginx, gunicorn and django all installed. The nginx ...
user avatar
0 votes
0 answers
85 views

gunicorn, systemd, and WINCH not playing well together

Based on the docs you can spin up a "new" gunicorn with kill -USR2 Then you can send a kill -WINCH to the old master process to kill off it's workers. But if Systemd launches gunicorn (like ...
user avatar
  • 549
1 vote
0 answers
39 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 ...
user avatar
  • 111
0 votes
1 answer
674 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....
user avatar
  • 111
2 votes
1 answer
247 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,...
user avatar
  • 141
0 votes
0 answers
468 views

Google App Engine deploying django ModuleNotFoundError: No module named 'app.wsgi.application'; 'app.wsgi' is not a package

I have encounter this error '502 Bad Gateway nginx' when running a django app on google app engine. When I check the logs I got this Traceback (most recent call last): File "/layers/google.python....
user avatar
0 votes
0 answers
782 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 /...
user avatar
  • 273
0 votes
0 answers
517 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 ...
user avatar
1 vote
1 answer
156 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 { ...
user avatar
  • 13
0 votes
1 answer
456 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 ...
user avatar
  • 273
1 vote
2 answers
682 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 ...
user avatar
  • 3,440
0 votes
0 answers
1k 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 ...
user avatar
  • 1
0 votes
1 answer
110 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 ...
user avatar
  • 119
-1 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
155 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 ...
user avatar
  • 103
0 votes
1 answer
624 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 ...
user avatar
0 votes
1 answer
118 views

502 error from nginx. It doesn't seem to be listening to any port, but will connect to default

Facts: Nginx default can be accessed. Gunicorn is running, the website can be accessed via LAN. Nginx runs, does not give me any errors. When I check sudo lsof -i -P -n | grep LISTEN , it tells me ...
user avatar
0 votes
0 answers
369 views

Nginx Gunicorn not serving requests to external ip

I have develop a python flask project which is run on linux server. I'm trying to develop it on my linux server. After much effort on this. I have configured nginx, gunicorn and my application. My ...
user avatar
  • 1
0 votes
1 answer
865 views

pymongo + flask + gunicorn: "Authentication failed" before first operation when "connect=False"

I'm using MongoDB Atlas. I'm have this URL for connecting: mongodb+srv://<LOGIN>:<PASSWORD>@<URL>/<DB>?retryWrites=true&w=majority&authSource=admin. I'm using this ...
user avatar
2 votes
1 answer
651 views

Django + Gunicorn + Kubernetes: Website down few minutes on new deployment

I am having this issue with Django + Gunicorn + Kubernetes. When I deploy a new release to Kubernetes, 2 containers start up with my current image. Once Kubernetes registers them as ready, which they ...
user avatar
  • 21
8 votes
1 answer
8k views

Invalid HTTP_HOST header. The domain name provided is not valid according to RFC 1034/1035

I am getting Invalid HTTP_HOST header error on my server. I don't understand why it's happening and how to fix it. Everytime it happens backend stops working and I have to restart the server. Any help ...
user avatar
1 vote
0 answers
632 views

Nginx stopped and failed to restart - open() “/run/nginx.pid” failed

I am running my django apis, deployed on Ubuntu 18, on Nginx and running via Supervisor. I am using Certbot for SSL certs and this is the only web service running on this webserver. No other websites ...
user avatar
  • 111
0 votes
0 answers
307 views

EC2+nginx+django+gunicorn+letsencrypt ssl -> TIMED OUT

I've been struggling for a few hours now and went through lots of similar questions on SE. However, I couldn't manage to fix my probelm . To answer the obvious questions: there's no firewall on my ...
user avatar
  • 101
2 votes
0 answers
144 views

How to load balance in nginx based on user category

There will be a web application served by gunicorn with pod instantiated in every node in Kubernetes cluster. External load balancer (limited to the round-robin or least connections methods) drives ...
user avatar
  • 121
0 votes
1 answer
665 views

Gunicorn (with Flask) parameters for Google Cloud Run - production setup?

This question was taken down on SO with a suggestion to ask here, so here goes: Looking for some guidance from people with experience in this area. I run a Docker container (approx. 670mb in size) in ...
user avatar
0 votes
1 answer
45 views

nginx not displaying correct page when navigating to www.domain.com ok when just domain.com

I'm trying to deploy nginx / gunicorn / flask on ubuntu and all seems to be working when I navigate to "domain.com" but when i go to "www.domain.com" i get the defualt splash ...
user avatar
1 vote
1 answer
532 views

gunicorn stopped finding wsgi directory

I configured a django app with nginx gunicorn and supervisor. Everything has been working fine for months until today. I have not touched any of the config files but somehow I now get a 502 bad ...
user avatar
-1 votes
1 answer
1k views

Running django and gunicorn on raspberry pi

So I am trying to follow this here: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 except on the latest raspberry pi. I think ...
user avatar
  • 67
0 votes
1 answer
686 views

Enabling systemctl service does not load at boot

I have set up gunicorn to server two Django sites, as per this setup. This works well. If I run: # systemctl start gunicorn@my_website.service Then all is well and my website is being served as ...
user avatar
0 votes
0 answers
564 views

Nginx: how to increase backlog (net.core.somaxconn), without changing sysctl.conf? Want to allow many pending connections

I am not running a webapp, but rather a Machine Learning model which needs to provide real-time predictions. Am using Nginx with Gunicorn, both of which are running in a docker container. The setup ...
user avatar
0 votes
1 answer
97 views

systemctl start nginx doesn't do anything

if I do systemctl start nginx, it just goes to the next empty line, without letting server to work, like so: [[/home/sc/pro]]# systemctl start nginx [[/home/sc/pro]]# if I do nginx -t: nginx: the ...
user avatar
0 votes
0 answers
380 views

504 gateway timeout - ELB, Nginx, Gunicorn

Helllo guys. I am unable to download long-running reports. The site is under ELB, nginx and gunicorn as a backend server. In nginx I configured following settings: proxy_connect_timeout 600s; ...
user avatar
0 votes
1 answer
479 views

Conda, Django, Gunicorn and Supervisor bad interpreter: No such file or directory

I'm following this tutorial to deploy my Django app, but modified my executable /var/www/my_django_project/bin/gunicorn_start to use my conda env instead of virtualenv. CONDA_SRC=/home/justin/...
user avatar
0 votes
1 answer
36 views

Python webserver for mobile app [closed]

I would like to setup a python webserver for my mobile app It will not serve any media, css, html, etc.. Therefore I thought about gunicorn + python app without nginx, at least for the beginning The ...
user avatar
1 vote
0 answers
1k views

Why is gunicorn not creating a .sock or .pid file?

First things first, I would like to clarify that I am completely knew to debugging servers and deploying in general. I'm a student developer for my university and so far all of my work has been ...
user avatar
1 vote
1 answer
3k views

Do I have to restart my server after changing settings.py?

I have a django app hosted on digitalocean with gunicorn and nginx. I have just changed something in settings.py. I have taken my SECRET_KEY and now I stored it in etc/secret_key.txt settings.py with ...
user avatar
  • 115

1
2 3 4 5 6