-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Websocket communication error #423
Comments
Hello @batzkass, wonderful exhaustive bug report, thank you. |
Unfortunately this doesn't change anything, I went up to 10000. In addition, when the issue occurs it's almost instantaneous (subsequent to my click on the button), way less than 1 second. It looks like a sending buffer that is filled faster than it is emptied (by actual sending). Is there somewhere this kind of buffer size in the websocket lib ? |
I think about something else : to solve the last issue we had, you added a test, whether the socket is writable or not. If the previous message is still not fully received or acknowledged, the socket may not be writable for the current one. Perhaps we should wait a bit an retry in this case before closing the connexion ? |
Well, the following code seems to fix the issue, at least for the minimal example I gave on 4G connection and 5000 (!) labels.
EDIT: ... but I get again bad results on connection drop (server not reacting to clicks for example...). I hope all these information will help you. |
@batzkass thank you very much for all this debug and support. Instead of creating a for loop it could be possible that a timeout other than 0 would solve the problem in this function call: Or maybe we have to check which kind of error is returned. |
Well, a timeout of 2s seems to fix the issue (without the loop). But let me a few days to confirm this on real conditions. |
@batzkass This should be fixed now (with a very long delay, excuse me). If you can give it a try it would be great, if you cannot than no worries. ;-) |
Hi Davide,
I finally upgraded Remi from 2019.11 to 2020.11.20 some days ago, so that I can benefit from the bugfix of the connection drop we worked on. It seems that many things changed in Remi since one year and it took me less than 10 minutes to adapt my server code (which is kind of huge now), so congratulations for your efforts to make it easy to maintain.
I saw that you worked on the websocket transmissions on both server and client side, and unfortunately I'm facing a new websocket bug that wasn't on 2019.11. It took me hours to reproduce, isolate and finally create a minimal (not-)working example.
Conditions to reproduce:
VBox
) of 100Labels
, and at the top aButton
. The button triggers a function that successively updates the Labels text, hence sending 100 websocket messages in a row. If you don't succeed to reproduce it, increasing from 100 to 1000 the number of Labels should increase the probability of occurrence.Symptoms:
_ws.onerror
, making the server to close the connection. On the client side, we see for a short time Remi's "loading folding square". After that, a new websocket is automatically established and the page is fully re-sent to the client.Misc. notes
This issue affects my code as, when I do a refresh, I also sometimes send some "user-defined" javascript code to the browser. If the issue happens before my manual javascript sending, so it's not executed and the page doesn't display fully. Apart from that, the client only sees the "waiting rectangle" then a new connection initiate. Also, I'm a bit confused as this bug was not present in Remi 2019.11.
NB: in the log above I increased the number of chars displayed by the sever in server.py
send_message
to see a little bit more.Could you please have a look and try to reproduce this ?
Thanks,
François
The text was updated successfully, but these errors were encountered: