gunicorn

bottle / gunicorn not responding to SIGTERM after ANY request

bottle / gunicorn not responding to SIGTERM after ANY request Question: I have used bottle for a long time and never run into this before, but recently I started a new project and encountered some strange behaviour that I just can not track down at all. If I start a bottle instance in my script, …

Total answers: 1

Gunicorn3 goes to the development server

Gunicorn3 goes to the development server Question: When I open a server with gunicorn for my flask app, it automatically opens the development server of flask, without giving me any errors: $ gunicorn3 –workers=1 main:app [2023-10-16 19:46:13 +0000] [1061] [INFO] Starting gunicorn 20.1.0 [2023-10-16 19:46:13 +0000] [1061] [INFO] Listening at: http://127.0.0.1:8000 (1061) [2023-10-16 19:46:13 +0000] …

Total answers: 1

NGINX Configuration Issue: One Domain Works, Another Doesn't

NGINX Configuration Issue: One Domain Works, Another Doesn't Question: I’m facing an issue with my NGINX configuration where one of my domains works correctly, but the other doesn’t. I have two domains (domain1.site and domain2.site) with their respective configurations in NGINX. Here’s the NGINX configuration for domain1.site: server { listen 80; server_name domain1.site www.domain1.site; return …

Total answers: 1

Gunicorn with django giving 500 with no extra information

Gunicorn with django giving 500 with no extra information Question: I am trying to run django 3.2.16 with gunicorn, I get this output in console: [2023-01-15 23:45:39 +0100] [210935] [INFO] Starting gunicorn 20.1.0 [2023-01-15 23:45:39 +0100] [210935] [DEBUG] Arbiter booted [2023-01-15 23:45:39 +0100] [210935] [INFO] Listening at: http://0.0.0.0:8000 (210935) [2023-01-15 23:45:39 +0100] [210935] [INFO] Using …

Total answers: 1

FastApi with gunicorn/uvicorn stops responding

FastApi with gunicorn/uvicorn stops responding Question: I’m currently using FastApi with Gunicorn/Uvicorn as my server engine. I’m using the following config for Gunicorn: TIMEOUT 0 GRACEFUL_TIMEOUT 120 KEEP_ALIVE 5 WORKERS 10 Uvicorn has all default settings, and is started in docker container casually: CMD ["uvicorn", "app.main:app", "–host", "0.0.0.0", "–port", "8000"] Everything is packed in docker …

Total answers: 1

Gunicorn flask app can't download file using playwright on linux

Gunicorn flask app can't download file using playwright on linux Question: I’m making a ReST API using Flask and Playwright to download some files on a server. Locally, it works but, in server (Linux), returns a permission error. file = await self._loop.run_in_executor(None, lambda: open(path, "wb")) PermissionError: [Errno 13] Permission denied: ‘/var/apis/tceprotocolo/infos-(19).html’ local_save = ‘/var/apis/tceprotocolo’ def …

Total answers: 2

How to create a Gunicorn custom application with Click commands?

How to create a Gunicorn custom application with Click commands? Question: I am trying to build a custom application using gunicorn server with flask framework utilizing click commands. I used the class App to create an application that has the command say_hello which outputs Hello to the terminal: import click from flask import Flask from …

Total answers: 1

Why does gunicorn need to restart so often in my gcloud appengine app?

Why does gunicorn need to restart so often in my gcloud appengine app? Question: I am using Flask to run an application. The application will be deployed on gcloud appengine. Currently, when I run it on my local dev machine, there is no issue. But when I run it on gcloud appengine, it appears that …

Total answers: 1

Printing username on stdout with Django + Gunicorn Application

Printing username on stdout with Django + Gunicorn Application Question: Right now my Django + Gunicorn app is printing only this info: [03.10.2022 19:43:14] INFO [django.request:middleware] GET /analyse/v2/ping – 200 If request is authorized, I would like to show also user (username/email) behind the status code, something like: [03.10.2022 19:43:14] INFO [django.request:middleware] GET /analyse/v2/ping – …

Total answers: 2

Pipenv package hash does not match lock file

Pipenv package hash does not match lock file Question: We have a lock file which has not changed since April 2021. Recently, we have started seeing the following error on pipenv install –deploy: ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the …

Total answers: 1