-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
Incompatible with django-channels #216
Comments
I get the exact same results as described in #65. Although for me, I don't have django-channels, but I do have a multi-tenant DB with django-tenants http://django-tenants.readthedocs.io/en/latest/index.html First request works, all the rest fail. |
+1. Fails when using django-channels (exception about not properly installed middleware) |
+1 |
So as far as I can tell this is just because ASGI applications don't use the same middleware, but do (possibly) make SQL queries. Silk probably needs to provide a channels-compatible middleware. |
That's natural. @carltongibson what do you think about the @fish-face comment? |
I'm guessing this is a threading issue. Channel's So what's going on? Well, without looking more, I don't yet know but, ultimately we're dispatching the view inside a So, what to do? I think the simplest bet right now would be to run a WSGI server to handle traditional HTTP and then your ASGI server for websockets etc. (i.e. you don't need to run sync things through ASGI.) Use Nginx (or whatever) to route requests to different backends depending on path or protocol or ... I hope that's of some help. |
This was mentioned in #65 but it is very old.
Even putting silk middleware as the very first item in MIDDLEWARE doesn't prevent the error.
How can we work around this to at least use Silk to profile everything but channels?
The text was updated successfully, but these errors were encountered: