You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing, it seems that when we have some numbers of requests at the same time, the exception SynchronousOnlyOperation is thrown, after testing for a bit, I found that this part of the code here:
and when I comment the async_to_sync(channel_layer.group_send)("name", payload) line, the problem stops from happening. Which makes me almost certain that the problems happens because of the async context inside .group_send
To me, it seems that when we hit some async event_loop other requests coming in that are reusing the thread stumbles to the exception. But then I thought that the async_to_sync should solve this problem, or am I wrong?
At this point, I'm mainly checking if this is a common behavior, or if anyone had face this problem before and could share a fix.
StackTrace
I know this StackTrace is not directly related to the code snippet I put above, but it's an example of the problem that is created when I have the channel group_send method call (when I remove the .group_send call, this exception never happens).
OS
PIP Freeze
List
Problem
While testing, it seems that when we have some numbers of requests at the same time, the exception SynchronousOnlyOperation is thrown, after testing for a bit, I found that this part of the code here:
and when I comment the
async_to_sync(channel_layer.group_send)("name", payload)
line, the problem stops from happening. Which makes me almost certain that the problems happens because of the async context inside.group_send
To me, it seems that when we hit some async event_loop other requests coming in that are reusing the thread stumbles to the exception. But then I thought that the
async_to_sync
should solve this problem, or am I wrong?At this point, I'm mainly checking if this is a common behavior, or if anyone had face this problem before and could share a fix.
StackTrace
I know this StackTrace is not directly related to the code snippet I put above, but it's an example of the problem that is created when I have the channel group_send method call (when I remove the .group_send call, this exception never happens).
Service
The service is started using gunicorn, on a wsgi server.
The text was updated successfully, but these errors were encountered: