Questions tagged [wsgi]
Web Server Gateway Interface (WSGI) is a standard for web applications written in Python.
2,490
questions
0
votes
0
answers
30
views
Failed authentication for Google Sheet and Django running in Apache server
I'm implementing a Django application that uses a Google Sheet as database, and is hosted with Apache in a Rocky Linux server.
To test the integration between Django and Google Sheet, I have followed ...
0
votes
0
answers
39
views
Why WordPress' server doesn't need to be reloaded after update?
When I change my Flask application, I have to restart my WSGI server to see the changes. My question is how WordPress doesn't need to be reloaded after each update or installing a new plugin? Is it ...
0
votes
1
answer
23
views
UWSGI Why would there be unattended requests . According to the log
I've got the below in my uwsgi log running with Django and Nginx. The req: -/- field i believe is referring to the request count and the total number of requests respectively. They're both ...
0
votes
0
answers
13
views
Error while connecting to MSSQL db using django application running on apache web server with ODBC17
Im trying to connect to a MSSQL2012 db with django 4.2.4, the application is running on an Apache2 web server using mod_wsgi running on debian12. Im getting the followinf error
"('08001', '[...
0
votes
1
answer
13
views
How can I "mount" a proxy_passed WSGI application onto a subdirectory of a website on NGINX?
I am using NGINX version 1.18.0 on Ubuntu 20.04.6 LTS on WSL2 version 1.2.5.0 on Windows 10
I have been trying to get to know deploying a WSGI application. I built a small thread-messaging web ...
0
votes
0
answers
15
views
flask gunicorn pass custom parameters for every other concurrent user
value1 = "hi"
value2 = "hello"
@app.route('/', methods=['POST'])
def handle_request():
return value1
when user1 alone make request to our server we want to send "hi&...
0
votes
2
answers
38
views
Connecting CSS and JSS to HTML on the WSGI client
I have the following code that implements page routing on the waitress server. I am faced with the following task: I need to connect CSS and JS styles, how do I do this?
from waitress import serve
...
0
votes
2
answers
70
views
Static and Media files are not shown in django website - nginx & gunicorn
I'm trying to deploy a django website on a vps and it's now up and running(after a lot of trouble!), but now my media and static files are not shown in my website and I really tried a lot of ways but ...
1
vote
1
answer
89
views
Run ASGI Application with FastAPI inside a Jelastic PaaS Environment using mod_wsgi
I want to use FastAPI inside my python project, I want to deploy it on a Jelastic PaaS.
Apparently mod_wsgi manages only WSGI application so I was trying to run an ASGI application inside a WSGI ...
0
votes
0
answers
28
views
Returning generators not working on WSGI server but is fine locally
This might be a tricky issue, but essentially, I want the server to return (yield) a text, wait for a moment, and then return another text on the same connection. Here's a sample server code:
from ...
0
votes
1
answer
13
views
Mod-wsgi calls flask factory function twice
I am trying to build a flask app and using mod_wsgi server for hosting. I use a factory function to create the flask app but I observe that mod-wsgi calls the factory function twice within the same ...
0
votes
1
answer
13
views
django gunicorn nginx forward to <domain>/app
I have searched tutorials and SO all over but unfortunately I still don't understand how to forward requests for my domain to a specific app (not the project).
this is my project structure
...
-3
votes
1
answer
35
views
Using Selenium package inside WSGI app generates error [closed]
I am developing Flask application and I included selenium cronjob as a background job.
It works when I run it on my local PC (Ubuntu22.04)
But after I deployed it on CentOS9 server, it is not working.
...
0
votes
0
answers
21
views
Apache wsgi 'Permission denied' error when opening read/write SQLalchemy db file, works outside of server
I'm running a Flask app on apache with a SQLalchemy db.
The app works totally fine on the server until I try to create the database. Immediately after db.create.all(), it returns a long stack of ...
0
votes
1
answer
34
views
Taipy deployment through Apache WSGI
I'm exploring Taipy and looks very promising but I was wondering if it is possible to run it in an Ubuntu Server with a LAMP setup? I'm already running flask applications there.
Best regards,
Carlos.
0
votes
0
answers
282
views
ModuleNotFoundError: No module named '\\mysite\\settings'
I have read the previous questions and answers here, and tried the suggested solutions, however still getting ModuleNotFoundError: No module named '...\mysite\settings'
The project is DosV3Master with ...
0
votes
1
answer
25
views
Switching to a web framework from vanilla WSGI
Our stack split into four main components:
Several web applications that contain only the presentation layer
Another application that we called Warden that contains a set of WSGI endpoints that we ...
0
votes
0
answers
29
views
Permission denied app.log Flask python wsgi apache
I have a flask app on Apache server with wsgi.
However, there is a problem with logging.
When I launch the app the apache error log:
[Wed Aug 23 15:32:09.743373 2023] [wsgi:error] [pid 36533:tid ...
0
votes
0
answers
22
views
Multiprocessing dictionary update flask web server on WSGI
I want to synchronize a Python dictionary running on my Flask application, which will be hosted on WSGI.
I have the following code
from flask import Flask
sessions = {}
@app.route('/', methods=['GET'...
0
votes
0
answers
94
views
How to configure nginx to serve multi-tenant django application
I would like to deploy a django application with the django-tenants library.
The project works fine locally, I can create tenants and access them via localhost:8000 and <tenant>.localhost:8000
(...
0
votes
1
answer
68
views
Connecting to Cassandra in Flask and multithreaded wsgi application
I am trying to connect to cassandra database in flask app running using multithreaded wsgi gateway. I am trying to connect using following code:
def connect_to_cassandra():
auth_provider = ...
0
votes
0
answers
17
views
Newbie on Flask Python, how to host python app inside an already Apache2 domain web site?
I have searched everywhere in Google and tried many ideas... still to no avail.
Basically I already got an existing Apache2 domain-ed web site hosted in CentOS7 running under its designated user/group=...
0
votes
0
answers
44
views
Performance issues with gunicorn + gevent Django
I'm encountering performance issues with gunicorn+genevent that is consuming a significant amount of RAM after conducting a high-load test. Even when I return an empty view with just a "hello ...
0
votes
0
answers
44
views
Import python modules where . json error on Flask
When I installed python Flask on the Apache server and configured it via wsgi, an error occurred when importing python modules.
Python version 3.8.10
Flask version 2.3.2
ERROR:
File "/var/www/...
0
votes
0
answers
46
views
Can't access Gunicorn server from Google Cloud
Pretty much the title. I'm trying to set up a simple WSGI server on Google Cloud VC but I simply can't access it from my machine: it just times out.
*@*:~/*$ python3 -m gunicorn app:app port --bind :...
0
votes
0
answers
28
views
Python and FastCGI protocol
I try to understand what types of web-servers exist (static Apache Server, Apache Server + CGI, Apache Server + FastCGI).
So, my question: how to setup Apache Server to run python with FastCGI ...
0
votes
0
answers
34
views
How to use dbus-next (asyncio) with Flask
I have a small embedded Linux box with a WSGI web app deployed with nginx + gunicorn + flask.
I'd like to show on the web interface some internals of the linux box, such as service status (running, ...
0
votes
0
answers
98
views
Permission Denied for Gunicorn
I in the middle of deploying a django apps in linode. I am new to this so I just follow tutorial from digital ocean. Link here
When I tried to check gunicorn status with this
sudo systemctl status ...
1
vote
1
answer
19
views
mod_wsgi with two python versions
I have an Ubuntu-18.04 LTS EC2 serving a django application with mysql Ver 8.0.16, Apache/2.4.29 and mod_wsgi/4.6.5complied withpython3.6. Now, I am targeting to deploy a new django application in ...
0
votes
0
answers
413
views
Django ASGI vs WSGI performance
I am trying to test the performance difference in ASGI and WSGI servers when there are i/o bound functions. I am going to receive streaming responses from 3rd party APIs and then stream them back to ...
0
votes
0
answers
77
views
Enable datadog tracing for apache wsgi flask app
I have python flask docker app running on apache server with mod_wsgi. I wanted to datadog tracing to the app but I am confused where on entrypoint I should add ddtrace-run command. The only thing we ...
0
votes
0
answers
136
views
uWSGI can not be installed on EC2(AWS) (Python3.10)
Background
I am building web application with Flask/nginx on EC2 server(AWS, Amazon Linux 2). uWSGI is essential as an application server between nginx and Flask-based python programs. However, I can ...
0
votes
0
answers
29
views
Flask WSGI application hangs when import transformers
I am trying to deploy flask wsgi server. The problem starts when in my app.py file I do following import - from transformers import MarianMTModel, MarianTokenizer. This makes my server hang and I don'...
0
votes
1
answer
51
views
How to increase the url length limit in WSGI?
I am using WSGI(Web Server Gateway Interface) server for my application.
I am getting 414 error when I exceed 8k characters in the url. However the api calls work fine for url lengths up-to 8k ...
0
votes
1
answer
89
views
What is the default maximum url limit in Flask?
I am working with Flask and WSGI Server. I am getting 414 error when i fire call with large urls(above 8k characters).
I need to find out if it is limited by the Flask or the WSGI.
Is there any ...
0
votes
1
answer
87
views
Selenium fails to open in flask WSGI environment
I'm trying to run Selenium inside the context of a Flask application running on Apache as a WSGI application inside a venv.
(I strongly suspect the problem is permission-related but can't figure out ...
0
votes
0
answers
11
views
Messages not appearing on HTML using Django - messages
I know a lot of questions were around that topic, but I still cannot understand why in my case it's not working.
I have the function on my views.py
@csrf_exempt
def index(request):
if request....
0
votes
0
answers
60
views
Giving access to /var/run/apache2/wsgi.xxxx.x.x.sock file
my vps is running webuzo panel
i tried installing my python api using the webuzo panel realizing that cant have my way, i'm trying to setup the python api manually
if my server is just a normal ubuntu ...
0
votes
0
answers
24
views
Why is Apache returning a segmentation fault when importing WeasyPrint in my flask app?
so im working on a project and for it I need to print certain pages using weasyprint. Everything works fine on localhost, but once it is on the server it crashes.
Through some personal testing I have ...
0
votes
0
answers
34
views
Django - [wsgi:error] [pid 16542:tid 140650901133056] Truncated or oversized response headers received from daemon process
I have googled and tried each and every option but nothing worked .
Below are the version specification which is used .
Apache/2.4.37 (AlmaLinux) OpenSSL/1.1.1k mod_wsgi/4.6.4 Python/3.6
and mariadb ...
0
votes
1
answer
84
views
Why is ASGI labeled as "asynchronous" and WSGI as "synchronous"
I was researching this stuff for the first time and found the terminology to be confusing. A WSGI server handles one request at a time, and yet it is labeled as "synchronous" which means &...
0
votes
0
answers
93
views
Numpy error when deploying Flask app in Python 3.9 (linux): No module named 'numpy.core._multiarray_umath'
I'm trying to deploy a flask app on an Azure Ubuntu 20.04 VM (Standard E20as v5) using apache2 + wsgi.
The flask app is located at /var/www/html/FLASKAPP.web.tool/ with a Python venv in /var/www/html/...
0
votes
1
answer
156
views
Apache2 + wsgi + flask unable to load the homepage (or- produces "504 gateway timeout") on an Ubuntu 20.04 Azure VM
I'm trying to deploy a flask app on an Azure Ubuntu 20.04 VM (Standard E20as v5) using apache2 + wsgi.
The flask app is located at /var/www/html/FLASKAPP.web.tool/ with a Python venv in /var/www/html/...
1
vote
0
answers
1k
views
TypeError: Flask.__call__() missing 2 required positional arguments: 'environ' and 'start_response'
I created very simple Flask app, and it works in Flask dev mode just fine. But when I try to make tests for it I get this error:
TypeError: Flask.call() missing 2 required positional arguments: '...
0
votes
0
answers
101
views
Python Flask REST API path 404
I am currently undertaking to develop a simple REST API in Python. When I access the URL through my browser, I get snake.app-host.com/login a 405 error, which is expected in this context.
However, ...
0
votes
0
answers
30
views
Deploy Flask in Apache, and still enable Apache Directory Listing
I have written a Flask app, which is running through Apache on a Docker-Container.
The flask app is vulnerable on purpose!
It is designed to teach students about Secure Coding.
To make the website ...
0
votes
0
answers
25
views
Spotipy service on WSGI Flask Server
I am currently working on a WebApp for music control on an existing WSGI server I have. If I run the debug main.py file directly on the server with ssh command it all works perfecly fine but when I ...
1
vote
0
answers
88
views
How to deploy django app with channels and websocket on cpanel?
i have a django with websocket and channels wokring locally using daphne and i want to deploy it to cpanel ?
I try to use : a2wsgi but it didn't work
i want to know if cpanel works with asgi ...
0
votes
0
answers
101
views
Is using the developement server from Werkzeug/Flask for a local app fine?
Hey !
I have a local app, packaged with Flask and Werkzeug, which launches a Werkzeug server on the client's computer, allowing the user to use the web app from their computer. It is not connected to ...
0
votes
0
answers
62
views
How to use Gevent/ asyncio if I already use ThreadPoolExecutor() in my code
I've developed a Flask app where I use ThreadPoolExecutor(max_workers=4) in my code.
I use this pool of threads when I send API requests to 3rd parties, in order to work in an asynchronous fashion.
I ...