uwsgi

uWSGI Segmentation Fault With Flask/Python App Behind Nginx After Running for ~24 hours

uWSGI Segmentation Fault With Flask/Python App Behind Nginx After Running for ~24 hours Question: Problem I have a Python/Flask app running in prod with uWSGI behind Nginx that deploys my personal projects via Docker. It works great for about 12-24 hours when it suddenly starts segfaulting. The app accepts requests and starts a Python thread …

Total answers: 1

How to stop an infinite loop when you run Flask application in a production mode

How to stop an infinite loop when you run Flask application in a production mode Question: I have the Flask application. It has two buttons Start and Stop. A program should print ‘pStart’ (an infinite loop of pStart-s) when a user click Start and stop printing when a user click Stop. A user can resume …

Total answers: 1

playwright doesn't respond with systemctl service

playwright doesn't respond with systemctl service Question: My server is running on Ubuntu 22.04.1 LTS and I have a python flask app which runs perfectly with an active virtual environment (source bin/activate) using wsgi [python 3.10]. While all my other routes are working fine, I can’t make playwright related routes run using systemctl service. For …

Total answers: 1

Django admin broken template when using uwsgi

Django admin broken template when using uwsgi Question: When I start my application using python3 manage.py run server 0.0.0.0:8000 I can access Django admin just fine. However, when I run it using uwsgi the Django admin template is broken. The application works fine, but the website is displayed as simple text, no templates at all. …

Total answers: 1

How to install uwsgi on windows?

How to install uwsgi on windows? Question: I’m trying to install uwsgi for a django project inside a virtual environment; I’m using windows 10. I did pip install uwsgi & I gotCommand "python setup.py egg_info". So to resolve the error I followed this SO answer As per the answer I installed cygwin and gcc compiler …

Total answers: 1

Deploy a flask application alongside a Django application with uwsgi + nginx

Deploy a flask application alongside a Django application with uwsgi + nginx Question: I’m trying to deploy a simple flask app in a server where is currently deployed a django app. The django app works okay, but with the flask app shows 404 error, although I’ve done the correct settings and I don’t see any …

Total answers: 1

uwsgi: Send http response and continue execution

uwsgi: Send http response and continue execution Question: From the uwsgi documentation: def application(env, start_response): start_response(‘200 OK’, [(‘Content-Type’,’text/html’)]) return [b”Hello World”] Is it possible to respond to http request(close http connection) and continue execution flow(without any usage of threads/queues/external services etc)? like this: def application(env, start_response): start_response(‘200 OK’, [(‘Content-Type’,’text/html’)]) end_response(b”Hello World”) #HTTP connection is closed …

Total answers: 2