Django+Nginx+uWSGI = 504 Gateway Time-out

I am running Ubuntu 10.04, Django 1.3, Nginx 0.8.54 and uWSGI 0.9.7. Both Nginx and uWSGI load without error. However, when you access my site, it sits for a LONG time and then eventually loads a...

Django long running asynchronous tasks with threads/processing

Disclaimer: I do know that there are several similar questions on SO. I think I've read most if not all of them, but did not find an answer to my real question (see later). I also do know that...

How to set up autoreload with Flask+uWSGI?

I am looking for something like uWSGI + django autoreload mode for Flask.

ImportError: No module named sqlalchemy

I'm unable to find a module in python ,though easy_install says its already installed. Any idea how to resolve this isseue? $ python -c "from flaskext.sqlalchemy import SQLAlchemy" Traceback (most...

Internal Server Error with Django and uWSGI

I am trying to follow the steps in this guide: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html Before I even get to the nginx part I am trying to make sure that uWSGI...

Apache mod_proxy_uwsgi and unix domain sockets

I have a uwsgi server running for unix domain socket [uwsgi] ... socket = /var/run/someuwsgi.sock socket = localhost:9987 ... The mod_proxy_uwsgi is installed In apache config has that line: ...

linux ami nginx sites_enabled missing

We are trying to install nginx on a Amazon Linux AMI to config uwsgi and django. But there is no sites-enabled dir under etc/nginx unlike on Ubuntu. What am I missing here? We are trying follow...

Nginx error: (13: Permission denied) while connecting to upstream

I am getting this error in my nginx-error.log file: 2014/02/17 03:42:20 [crit] 5455#0: *1 connect() to unix:/tmp/uwsgi.sock failed (13: Permission denied) while connecting to upstream, client:...

What's the difference between Docker Compose vs. Dockerfile

I have been reading up and learning about Docker, and am trying to correctly choose the Django setup to use. So far there is either: Docker Compose or Dockerfile I understand that Dockerfiles are...

Why is PyMongo 3 giving ServerSelectionTimeoutError?

I'm using: Python 3.4.2 PyMongo 3.0.2 mongolab running mongod 2.6.9 uWSGI 2.0.10 CherryPy 3.7.0 nginx 1.6.2 uWSGI start params: --socket 127.0.0.1:8081 --daemonize --enable-threads --threads 2...

unrecognized command line option ‘-rdynamic’ on GCC v4.9.2

I'm using GCC v4.9.2 under Cygwin on Windows 7 64-bit, but running into an issue trying to compile uWSGI. The error I'm receiving is - gcc: error: unrecognized command line option...

How to install cffi package on AWS Beanstalk

This question looks the same as this post, but since there was no answer, I am re-asking here. I have a Django project to be deployed on AWS Beanstalk, which is using a package cffi. When I run eb...

504 Gateway Time-out uwsgi + nginx django application

I'm trying to run my Django application using Nginx + uwsgi, but I receive 504 Gateway Time-out after one minute of loading. My app takes time to do what needed as it searches for specific things...

How do I set register a variable to persist between plays in ansible?

I have an ansible playbook, where I'd like a variable I register on one machine to be available on another. In my case, I'd like to run a command on localhost, in this case git rev-parse...

What is the point of uWSGI?

I'm looking at the WSGI specification and I'm trying to figure out how servers like uWSGI fit into the picture. I understand the point of the WSGI spec is to separate web servers like nginx from...

Are a WSGI server and HTTP server required to serve a Flask app?

Setting up Flask with uWSGI and Nginx can be difficult. I tried following this DigitalOcean tutorial and still had trouble. Even with buildout scripts it takes time, and I need to write...

Override default harakiri duration of uwsgi in Flask/Python

For most requests/routes a standard harakiri value of 15s or 30s will be fine. But a few endpoints are long running (such as when generating reports) and I want the client to wait synchronously...

standard_init_linux.go:178: exec user process caused "exec format error"

docker started throwing this error: standard_init_linux.go:178: exec user process caused "exec format error" whenever I run a specific docker container with CMD or ENTRYPOINT, with no regard to...

flask application giving 504 timeout through Uwsgi and Nginx?

i am trying to deploy my keras model. it works fine with flask on port 5000 and when i try to test serving it through Uwsgi by this command uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi:app,...

unable to add certificates to alpine linux container

I have a small python app inside an alpine linux container, here is the dockerfile: FROM alpine # basic flask environment RUN apk add --no-cache bash git nginx uwsgi uwsgi-python py2-pip \ &&...

uWSGI command not found

Background: I am in the process of deploying a Django site and from my understanding and research, I needed to get a web server, a WSGI protocol interface to actually run said python code and...

How to Configure uwsgi + nginx + Django + websocket?

I successfully deployed uwsgi + nginx + Django. But I want to communicate with my server using websocket. I followed this tutorial to handle normal https...

Can't open lib 'ODBC Driver 17 for SQL Server' : file not found

I am fairly new to Python and Azure web apps. Any help is appreciated. My setup: Program: Visual Studio code Language: Python-Flask Cloud provider: Microsoft Azure Database: Azure SQL...

certbort commands return ModuleNotFoundError: No module named '_cffi_backend'

I followed a guide to get my python flask app running and I am at the last step where I change http into https with certbot. But when I run my certbot command sudo certbot --nginx -d domainname -d...

Main process exited code=exited status=203/exec

I followed a flask+uwsgi+nginx tutorial like this. However it comes with error: Warning: The unit file, source configuration file or drop-ins of myproject.service changed on disk. Run 'systemctl...

running celery tasks and celery beat in ECS with Django

I'm using ECS for the first time. I have dockerized my Django 2.2 application and using ECS and uwsgi to run the Django application in production. While in the development environment, I had to...

CKAN and NGINX conf for running CKAN under URL /path/

I have been setting up CKAN 2.9 in a local Debian Buster VM, by following the instructions on how to install from source and deployment. I got CKAN to run, using NGINX, UWSGI and Supervisor,...

Django Rest Framework + psycopg2 : InterfaceError: cursor already closed

I have a problem with psycopg2. It fails to perform some queries. I have traced exceptions and it says: django.db.utils.InterfaceError: cursor already closed I have already seen some similar...

Gitlab CI/CD: New runner has not been connected yet

I am very new to Gitlab CI/CD and I have read its documentation very carefully about creating a new CI/CD process using .gitlab-ci.yml file. As I have found out in order to have Continuous...

ModuleNotFoundError: No module named 'encodings' - uwsgi error when the virtualenv path is different from the project home

i'm getting a ModuleNotFoundError: No module named 'encodings' error from uwsgi when the virtualenv path is different from the project home. Environment: OS: debian bullseye uwsgi version:...