Django not Working in ASGI app in second/defferent process #5261
Unanswered
Msameim181
asked this question in
Q&A
Replies: 2 comments
-
Hi! Could you please open an issue in the python repository? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The repository you mentioned, refers to Flask and SocketIO, The purpose of the question is a combination of SocketIO and multiprocessing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have Django and FastAPI on process#1, and they work in Sync and Async functions with no problem. I am running the SocketIO app in process#2 with
multiprocessing.
Processusing
AsyncServerand
ASGIApp. The problem is that Django works with Sync functions like
get()or
create(), but if we use
aget()or
acreate()` the process disappears and vanishes. The rest of the line never runs with no error.and run it with
uvicorn
with proI have tried to add
get_asgi_application()
intoother_asgi_app
ofsocketio.ASGIApp
but nothing changed.I think the problem isn't from the Django setting with async permissions, it is between the ASGIApp and Django.
When it logged the
self.socket_application
fromASGIApp
something interesting showed up,...DjangoDBProcessRemove object ...
.I would be looking forward to any help.
Update: If I run the SocketIO application in the main process works just fine. So I did. SocketIO in the main process and FastAPI in the Second with multiprocess, This time FastAPI faced this issue.
Beta Was this translation helpful? Give feedback.
All reactions