234 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
184
views
moving from Django-WSGI to ASGI/Uvicorn: issue with AppConfig.ready() being called synchronously in asynchronous context
I'm moving my application views to asynchronous calls as they are requesting a number of data from the database.
When running the async views from the wsgi server, everything is working according to ...
1
vote
1
answer
1k
views
Does FastAPI still need Gunicorn?
For a long time Gunicorn+Uvicorn was the default setup for running FastAPI in production. However, I recently came across a blog post saying:
In the meantime, this combination of Gunicorn and Uvicorn ...
0
votes
1
answer
66
views
Getting error message running Django server
I’m not able to run python manage.py runserver. I was able to run python manage.py migrate successfully. I even changed ASGI_APPLICATION = "MyProject.asgi.application" to ASGI_APPLICATION = &...
2
votes
1
answer
113
views
Is there any way to serve a Django application using preload, ASGI, and SO_REUSEPORT?
I can't find a way to serve our large Django application using all three of preload, ASGI, and SO_REUSEPORT.
Without preload and fork we use much more memory (gigabytes).
Without ASGI we can't serve ...
0
votes
1
answer
514
views
Django WSGI and ASGI
How can I run the ASGI and WSGI protocols separately in my Django project?
This is my project structure.
.
├── chat # <== my app name
│ ├── apps.py
│ ├── consumers.py
│ ├── __init__.py
│ ├─...
0
votes
0
answers
112
views
FastAPI app not detected by Passenger on cPanel-managed server (Phusion Passenger + Apache)
I am trying to deploy a FastAPI application on a cPanel-managed server using Phusion Passenger with Apache. However, Passenger is not detecting my app even after following the standard setup.
What I ...
0
votes
1
answer
36
views
Running simple async chatroom. Works fine in dev. Fails in Heroku
I've made an async chatroom app for a django website based on the excellent tutorial provided by django on django channels with daphne and redis.
https://channels.readthedocs.io/en/stable/tutorial/...
0
votes
0
answers
73
views
How Can I Get Django Global Notifications Via Channels To Work?
I have spent the last month or so on and off trying to get the django channels notification to work. I can't get notifications to work but the chat works as expected. Here is my code...
Consumers.py
...
0
votes
0
answers
273
views
Switching from WSGI to ASGI (Gunicorn + Uvicorn) in Django Production – Site Not Loading
I recently built a Django application using Django Channels for WebSocket support. My asgi.py is set up for handling both HTTP and WebSocket connections, and everything works perfectly in development ...
-3
votes
1
answer
62
views
Websocket 404 error after deploying to the domain
I setup websockets (chat module) in my Django application, it is working fine on my local machine but when I deployed my app to amazon ec2 instance with containerization it says 404 Not Found while ...
0
votes
1
answer
101
views
Can't create two sessions- one fails one works
I have a post request in Django views from which I am calling a Selenium WebDriver. I am running it on Linux.
I have set the DISPLAY in the OS environment.
Now when I call the request it does open the ...
1
vote
1
answer
1k
views
How to Properly Use dependency-injector with Litestar Controllers?
Problem Description:
I'm working on a sketch of a project using Litestar and I want to leverage the dependency-injector framework by Roman Mogylatov to handle dependency injection within my ...
0
votes
1
answer
165
views
Prometheus metrics in Sanic
I'm trying to add metrics to my Sanic app.
Prometheus provides Python client running as ASGI app - https://prometheus.github.io/client_python/exporting/http/asgi/ .
The question is how to run 2 ASGI ...
2
votes
2
answers
708
views
Get path template from starlette request from a middleware
I am building a middleware to log calls to functions among other things.
I have read about
FastAPI: How to get raw URL path from request?, which suggests to use request.scope.get("route"), ...
1
vote
0
answers
200
views
Django code freezes using Daphne on async database queries
I am running an async django application that is downloading some data.
As I want the downloads to run asynchronously, I defined some async methods to run as coroutines.
These methods sometimes have ...