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
0answers
14 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
0answers
9 views

Django nginx route 53 not redirecting to https but https is working

I have deployed a djago app on ec2 and connected domain with route 53. Everything is working very well. Also i have installed ssl and when i hit with this protocol, it works very well: https://www....
-1
votes
1answer
768 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
1answer
14 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 ...
0
votes
0answers
13 views

Unexpected 301 redirect in limited devices

I have an EC2 instance that hosts a Django app with Gunicorn and served by Nginx with following configuration. upstream app_server { server unix:/home/ubuntu/domain/app.sock fail_timeout=0; } ...
0
votes
1answer
84 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 ...
0
votes
1answer
48 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 ...
0
votes
0answers
25 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 ...
0
votes
1answer
298 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 ...
0
votes
0answers
57 views

Django nginx gunicorn ssl settings redirected you too many times

I have three Django websites and one of them which I try to redirect to SSL but i am getting below error instead. And cannot view the page. This page isn’t workingkodfanzin.com redirected you too ...
2
votes
0answers
123 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 ...
0
votes
1answer
1k 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 ...
1
vote
0answers
119 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 ...
0
votes
0answers
78 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 ...
2
votes
0answers
114 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 ...
0
votes
0answers
173 views

failed (111: Connection refused) while connecting to upstream

Using AWS EC2 Logs nginx-proxy | nginx.1 | rkfootwear.in 49.36.35.208 - - [17/Dec/2020:05:34:00 +0000] "GET / HTTP/1.1" 301 169 "-" "Mozilla/5.0 (Windows NT ...
0
votes
1answer
251 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 ...
0
votes
1answer
27 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 ...
1
vote
1answer
174 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 ...
-1
votes
1answer
407 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 ...
0
votes
1answer
176 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 ...
0
votes
0answers
256 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 ...
0
votes
1answer
42 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 ...
0
votes
0answers
140 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; ...
0
votes
1answer
202 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/...
-1
votes
1answer
28 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 ...
0
votes
0answers
19 views

Systemd service behaves differently when invoked through service and systemctl

I have configured a simple gunicorn service (web.service) to run as a systemd service unit but it behaves differently when invoked through, sudo systemctl start web.service as compared to when ...
0
votes
0answers
414 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 ...
0
votes
0answers
63 views

Nginx Reverse-Proxy in Front of Corporate Proxy

I have a FlaskApp with Gunicorn and a Nginx as reverse proxy. The problem is another corporate reverse proxy, which is in front of "my" Nginx reverse Proxy. I do not have access to it. The ...
0
votes
0answers
232 views

In Gunicorn, what are the repercussions of increasing worker timeout?

I have a Flask site running with nginx and Gunicorn. In searching for a solution to a timeout problem I've been having, I found this answer which suggests increasing the Gunicorn worker timeout. This ...
0
votes
1answer
492 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 ...
0
votes
1answer
36 views

How can I use the django shell while the server is running?

I have a django server deployed on digitalocean with gunicorn and nginx. I followed a tutorial, I think it was this one. Because of the tutorial I have django only installed in a virtualenv. When I ...
0
votes
0answers
110 views

gunicorn is always getting local host from nginx as RemoteIPAddr

I am trying to get the real/origin ip address of a request in a NGINX <-> GUNICORN setup. I believe I have set the right headers in NGINX: location / { # checks for static file, if not found ...
1
vote
1answer
265 views

Configuring SSL on nginx with proxy_pass

I am having problems making SSL work for a python/gunicorn based site that works perfectly fine on port 80. I am using proxy_pass to send traffic to upstream. Steps Completed so far Wildcard ...
0
votes
1answer
53 views

Why is NGINX timing out?

I have an application with about 200k users and am running a NGINX + Gunicorn(Python) server behind an AWS EC2 loadbalancer. I don't understand how my requests is always 4k/minute but only sometimes ...
0
votes
0answers
458 views

Django Gunicorn-Nginx 504 gateway timeout

I have read a lot of articles about gunicorn & nginx timeout configs . I have some requests on my website which take longer than 30 seconds . I changed all gunicorn timeouts to 3 seconds but ...
1
vote
0answers
249 views

Server crash (Error 500) repeatedly (running nginx + gunicorn on EC2 instance)

Okay, so I'm really confused about what's happening here. I've had my server up and running for about a month and everything was fine. The server was getting very little traffic (about 50-100 requests ...
0
votes
1answer
20 views

unable to access executable in PATH from remote server

I have an web application hosted with Django-gUnicorn-Nginx. The web app is working mostly fine and is accessible except for one functionality. Recently, I added pybedtools, a python wrapper package ...
1
vote
0answers
1k views

flask, gunicorn (gevent), sqlalchemy (postgresql): too many connections

I created Flask WSGI-application which uses gunicorn as WSGI-server, for DB it uses PostgreSQL through Flask SQLAlchemy extension. That's all hosted on Heroku. gunicorn configuration number of ...
0
votes
1answer
2k views

502 Bad Gateway nginx/1.14.0 (Ubuntu)

Im trying to deploy django app using nginx & gunicorn but its showing error sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/...
0
votes
1answer
710 views

Failed to start gunicorn.service: Unit gunicorn.service not found. Ubunto 18.04

I am following this How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 18.04 guide. I have created the following file .socket sudo nano /etc/systemd/system/gunicorn.socket [Unit] ...
0
votes
1answer
146 views

Nginx not responding from outside the remote box

My website (Django/nginx/gunicorn/mysql) which is hosted on a remote box was working fine, until I decided to restart remote box for some reason. So after the restart, in the remote box when I say ...
0
votes
0answers
363 views

Gubicorn/Nginx does not download files completely: [CRITICAL] WORKER TIMEOUT (pid:18)

I am running a django app with nginx in docker. I can download files via an API using the library requests. When I want to download a file with 55 MB somehow the connection breaks down and the ...
0
votes
0answers
996 views

Handling Multiple Concurrent Request in Django, Gunicorn, Nginx

I am facing some issue regarding multiple concurrent request handling in my site. To explain in details - I have a django view which recieves file from the request and then call an api and do some ...
0
votes
1answer
545 views

Receive 404 Not Found for a Flask app when I use Nginx as reverse proxy with Gunicorn socket

I have been following the tutorial here to deploy my own flask app to my Ubuntu 16 server. I used Nginx as a reverse proxy to pass requests to a gunicorn socket. Just in case anyone wants to know ufw ...
0
votes
0answers
1k views

Load testing throws Server 502 error: Bad Gateway after 700 users. Gunicorn, Gevent, Nginx, Django

I'm trying to reach 2000 concurrent users with my benchmarking tool. I'm using locust to simulate them. My server has 24vCPUs, 128GB RAM, 25SSD. I want to be able to serve 2000 concurrent users ...
1
vote
0answers
324 views

Scaling and Load testing Django Nginx and Gunicorn: 502 Server Error + Resource temporarily unavailable gunicorn.sock

I'm doing load testing with locust to see if my server can handle 1500 users. What I'm using: Django, Nginx, Gunicorn, Postgresql My droplet: 24vCPUs, 128GB RAM, 25GB SSD at about 1100 users I start ...
2
votes
0answers
446 views

How many celery and gunicorn workers on the same server?

I have one server that runs a Django application served by gunicorn and a Celery task queue. Gunicorn docs suggest (2 x $num_cores) + 1 as the default number of workers. Celery docs show that the ...
1
vote
2answers
940 views

Nginx & Django & Gunicorn - Redirecting subdomain to app

I did an extensive search on the topic but nothing could help me. I am currently building a Django site, and using Nginx to reverse proxy to Gunicorn. I am trying to separate my apps into subdomains....
1
vote
1answer
358 views

Gunicorn does not generate a sock file

First, I'm new to this subject. So I'm trying to serve a hello world flask app with nginx and gunicorn on a Centos7 server. But I'm getting 502 error on website. When I checked nginx's error.log file ...

1
2 3 4 5