-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
Repeated ws_receive in multichat example with a external test client #151
Comments
The test client might be of some interest for load testing #28. |
Yes, the message duplication issue is fixed in the latest master, there was a typo in enforce_ordering that got fixed with the rest of that patch. I'll get a release out right now. |
Ok, thanks! |
Released in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
(As there is no separate issue tracker for channels-examples, I post here instead.)
Thanks for the channels package and examples! I just started playing around with to test WebSockets with Django.
I'm running a slightly modified
multichat
example and a Autobahn/Twisted-based test client for sending data directly to the WebSocket. I'm getting repetitivechat.consumers.ws_receive
calls for a single message.https://github.com/jusic/channels-examples/
To reproduce, on a Ubuntu 14.04 LTS, redis-server 2.8.4:
Open the browser, create one user and one room.
On another terminal, run:
In the
multichat
example, I added atime.sleep(1)
tochat.consumers.ws_connect
to get the erratic behaviour show up more reliably. This imitates some processing load on the server during thews_connect
.On my setup, for a two sent messages (
join
andsend
),chat.consumers.ws_receive
gets called numerous times. I think it should only be called twice. Server console log starts showing someasgiref.base_layer.ChannelFull
exceptions after a while.redis-cli
shows 100+ asgi keys within few second.:Manually, after a redis-cli flushall and using the browser example to send a message, there are only < 20 keys.
To verify that the client is not issuing more than two/one calls per every 5 seconds, there is also a
testserver.py
that can be run instead of Django runserver .To me, this behaviour would suggest some problem in channels, or that I'm doing something wrong.
The text was updated successfully, but these errors were encountered: