Comments (8)
At minimum, a packet capture of the traffic on port 1113 would give us some insight into what is going on.
Is the subscription (rather than the connection) onDropped handler being invoked with a reason why the subscription was cancelled?
from event-store-client.
I haven't managed to do a packet capture yet. But I have found an issue on the server where the DNS was dropping periodically, so maybe this was the issue? I connect by direct IP however so I wouldn't have expected that.
I was logging in all the callbacks (onDropped / onErrror) in both the connection and subscription, but nothing was logged. I have switched to a poll based subscription for now, will revisit when i have more time.
from event-store-client.
It might be that the Event Store needs to be pinged regularly for it to consider the connection to be alive alive, and that's not something that the client does automatically, but those methods are exposed on the connection for your application to use.
from event-store-client.
Ok have updated our code to fire a ping every 10 seconds. Will keep an eye on it and see if this prevents the dropout.
from event-store-client.
Just to confirm, firing a regular ping to keep the connection alive appears to have resolved this issue. Would this not be something you'd have the client do on connect?
Anyhow thanks for the solution.
from event-store-client.
It would need to be done regularly so that the server knows that the client is still there. Ideally, that would be done on a timer in your application.
from event-store-client.
Yes. I have a wrapper class around the API with a connect and disconnect method. The connect method starts a timer pinging every 10 seconds, the disconnect clears the timer. Just thought this could maybe be behaviour the library could take over, as it's not immediately obvious for others that you'd need to do this for a long subscription.
from event-store-client.
Yeah, if there's a way we can get the library to do it that would be good.
It's been a while since I've looked at timers and threading in Node.js, so I'm not too familiar with how we can do it without potentially affecting the application itself.
from event-store-client.
Related Issues (20)
- Wish list for version 1.0.0 HOT 1
- handling of "socket has been ended by the other party" HOT 3
- Transaction support HOT 1
- Client connection lost during heartbeat timeout HOT 4
- Support for large messages
- Get most recent event in stream HOT 5
- TypeScript typings HOT 4
- How to handle connection errors? HOT 2
- Support for SSL HOT 1
- Many concurrent subscriptions on a connection closes connection with no error
- Error from long-running event handler HOT 14
- Support for Angular 5 + Typescript client-side app ? HOT 2
- Persistent Subscriptions/ Competing consumer HOT 1
- typedefinition bug HOT 1
- StoredEvent data and others received as Buffer HOT 3
- Support for async/await on the onEventAppeared for subscribeToStreamFrom HOT 2
- Accessing linked event information HOT 1
- Handling for circuit breaker HOT 1
- Minor bug in typescript definition file
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 event-store-client.