Comments (9)
@ptaoussanis Sorry for such a delayed update on this.
The ISP I was on was doing some kind of filtering on the CloudFlare IPs for our application in production - it required actually hitting the IP directly over http to actually see any notification that there was an issue.
How this manifested in Sente was much weirder as my client would be able to establish a connection with the production server via wss
and would be able to send and receive data. Then, after about roughly 20 seconds any outbound messages to the server seemed to stop sending. Inbound broadcasts (e.g. not replies to outbounds) seemed to still come in until either until Sente closed the connection due to ping/pong keepalive failing or Chrome determined the websocket connection had died on its own (this usually happened when enough broadcasts came through to reset ping/pong). We'd configured Sente to reconnect in this case, and so it would and again work for 20 seconds or so and this cycle would just repeat.
I'm really not sure what the ISP was doing in this case, it seems like it might have been just deciding to terminate a protocol it didn't understand after 20 seconds (and immediately terminating protocols it did understand).
In terms of discovery of the underlying issue - once I was able to reproduce the issue in plain WebSocket without Sente I then realized I needed to dig further out and then just happened to eventually discover the issue when hitting the IPs directly. I'm not sure how it would be easier to detect this kind of anomaly.
To make matters even more confusing I was able to maintain an unbroken connection to the server when using Postman's WS client - I have no idea why or what manner it was creating the connection that led to it not being terminated by the ISP.
I think this was mainly a perfect storm of unfortunate circumstances not least of which was this anomaly leading to confusing reports to the rest of the people trying to debug! I did get to learn a lot about some of the inner workings of Sente along the way which is still some time well spent I think :) but I'm not sure what additional debugging could have been provided when the issue was so far removed from the actual library.
from sente.
@butzopower Hi Brian-
Using sente 1.19.2 for server with a JavaScript client
Could you please clarify what you by "with a JavaScript client"?
Are you able to reproduce the problem with the reference example project?
Thanks!
from sente.
@ptaoussanis Sorry, I meant that the application client is using sente via cljs.
from sente.
Unfortunately have not been able to reproduce this issue locally at all, everything just works fine. I think what's bizarre is that it does work in production but only for a very short window, and also only fails in the browser and not in Postman.
from sente.
I'm finding it a bit difficult to understand your issue as described, sorry.
It'd be helpful to start with more of a high-level picture before delving into Postman or manually-constructed JS requests.
What's the issue that you're seeing exactly?
You're seeing an unexpectedly large number of automated Sente reconnections, but only in production? How were you alerted to this? Is there relevant log output you could share?
Is production otherwise behaving as expected?
Assuming the issue seems to occur only in production, is there anything significantly different between your dev and production environments? E.g. does production involve a proxy or something similar?
Is there any way to run the reference example project in some kind of production-like environment to see if the issue is reproducible there?
from sente.
Weirdly determined this was likely due to ISP filtering traffic (oddly after 20 seconds) as was able to corroborate the issue with (and only with) users on the same ISP. Was able to confirm ISP has stopped filtering now and everything is back to normal.
Sorry for the misreport, was a very weird (and annoying :)) scenario to be debugging within.
from sente.
@butzopower Hi Brian, thanks for the update.
Could you please share some more details about what kind of filtering the ISP was doing? I'd like to understand if Sente could do anything better in situations like this.
Thanks
from sente.
@butzopower Hi Brian, just pinging about this - would appreciate your feedback on this if possible. Thanks!
from sente.
@butzopower No worries Brian, thanks so much for the comprehensive info - that's very helpful 🙏 I'll look into this further next time I'm doing batched work on Sente 👍
from sente.
Related Issues (20)
- Client-id is nil in version 1.17.0 HOT 3
- Issue with 1.18.0-RC1 Cljs build HOT 8
- After upgrading to 1.18 event :chsk/uidport-close desn't work HOT 7
- Some dead websocket connections are never cleaned up HOT 27
- Example project browser auto-start exception HOT 1
- Sente 1.19.0 Encore version can cause build issues with shadow-cljs HOT 2
- Logged secrets when :client-id is nil HOT 2
- Complete catalog of client-side events HOT 7
- Ping events subject to wrapping by `wrap-recv-evs`?
- The very first time HOT 4
- Connection was interrupted while the page was loading HOT 24
- Carrier-grade NAT may affect the stability of websocket connections HOT 4
- Trouble transferring large data with Sente
- Ring 1.11 adoption HOT 4
- Undertow adapter error in logs HOT 7
- Possible out-of-order delivery of server->client messages HOT 14
- nodejs: call to undefined addEventListener causing problems HOT 1
- Uberjar failure with direct-linking=true HOT 1
- Deprecated warning - needs update to timbre 6.4.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sente.