-
Notifications
You must be signed in to change notification settings - Fork 639
-
Notifications
You must be signed in to change notification settings - Fork 639
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
Live-only subscription produces heartbeat timeout #425
Comments
This is a heartbeat timeout. Are you by chance hitting a breakpoint in your debugger? This causes it. On Saturday, March 21, 2015, Serg Rogovtsev notifications@github.com
Studying for the Turing test |
Where do I have to increase them - on server side, or on client side? I And why doesn't catch-up subscription produce them? On Sat, Mar 21, 2015 at 1:09 PM, Greg Young notifications@github.com
|
They are produced on the connection not by a subscription. Are you hitting Basically a heartbeat timeout is if you have not sent me a message in x On Saturday, March 21, 2015, Serg Rogovtsev notifications@github.com
Studying for the Turing test |
There are two places to set btw command line on server ext heartbeat On Saturday, March 21, 2015, Serg Rogovtsev notifications@github.com
Studying for the Turing test |
No, there's no breakpoint, I ran the code with no debugger attached. Let me rephrase the question: why do I get heartbeat timeouts with live subscriptions, and do not get them with catch-up subscriptions? -- СР -----Original Message----- They are produced on the connection not by a subscription. Are you hitting Basically a heartbeat timeout is if you have not sent me a message in x On Saturday, March 21, 2015, Serg Rogovtsev notifications@github.com
Studying for the Turing test — |
I think this is actually an issue with messages not being pumped because of async and await. Can you try removing your async stuff and blocking on the subscription coming back to see if this is the case - change:
to
|
"Let me rephrase the question: why do I get heartbeat timeouts with live It could also be the JIT compiler blocking. There are 1000 reasons why code Or it could be as James pointed out your calling code. All it is is at a connection level something caused the connection to not On Sat, Mar 21, 2015 at 1:56 PM, Serg Rogovtsev notifications@github.com
Studying for the Turing test |
@jen20 you were right! If I change But why is that? The only difference between first and second version is that (a) But that also explains why catch-up subscription works: it is synchronous. |
Sadly that's not the only difference - The issue is that you do have another computation - a blocking |
Ahem. I understand that there are differences in implementation, but I still hope, for my sanity, that |
That's not how it works in this case - you need to be pumping messages for anything to work. If you replace it with |
Both |
@jen20 you're right again, just moving
I wish I understood that. |
I am closing this as it appears to just be async/await |
I am trying to write a simple proof-of-concept with Event Store. The code follows:
(The code inside
EventProducer
just produces some random events that I want to work on.)When there's no subscription, everything works.
When I use catch-up subscription (code commented), everything works, even after the subscription switches from catch-up to live mode.
When I try using live-only subscription (uncommented),
EventStoreConnection
closes abruptly.Here's client log:
[08,07:48:34.509,DEBUG] TcpPackageConnection: connection [127.0.0.1:1113, L127.0.0.1:63046, {cfe5e213-404c-4256-a492-2b87b0cb893d}] was closed cleanly.
If I try debugging I see that connection closes during first attempt to publish an event to store (inside
EventProducer
), event never gets published, the control just never leavesAppendToStreamAsync
). The code for that is simplistic:Here's corresponding server part of log:
I am using latest stable build (3.0.3).
The text was updated successfully, but these errors were encountered: