-
-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
500 Error when heavy load on worker #1626
Comments
Hi. Thanks for the extra detail. This is essentially #1587 I think. ... For now your workaround is correct. Use WSGI for Django, adding the async channels stuff with ASGI at the side. |
I use ASGI of django even on webserver worker I just skip channel. It's not a ASGI problème but channel one isn't ? There is my View of start page
|
Can't now reproduce. This was likely resolved by v3.0.3 https://channels.readthedocs.io/en/latest/releases/3.0.3.html Happy to look at a sample project reproducing the issue. |
Hello,
I created a server with django 3.1.4 et Channel 3.0.1 for the websocket features. At start with launch it with several worker of uvicorn and nginx.
Everythings work fine until I have more then 10 request per second on my server. I take 10% of code 500 errors. I tested it with artillery.io with a single request on start page on my project (without authentification)
I tested with many asgi worker, uvicorn, gunicorn with uvicorn class, hypercorn, daphne : same problem.
There is two exemple of errors, one with uvicorn and other with daphne
I work on other project without channel and I haven't these problems on it on "heavy" load. So I test a workaround.
I split my workers on two type
I use a environnement variable for tell to django to no charge channel on webserver worker
There is the code I put on my asgi.py
I tell to nginx to use websocket worker for all /ws/ request and all other in webserver ones.
After this fix I no longer use channel for http request and I have no 500 errors like this.
This is clearly a channel error, but I don't know why I have these one with doing a request on a simple page.
there is my requirements
The text was updated successfully, but these errors were encountered: