-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[event-hubs] investigate TypeError thrown from rhea-promise awaitable sender #8584
Comments
I am also currently facing this error. I have multiple clients instantiated attempting to push thousands of events (batched) to an Event Hub. We have been trying to achieve an Event Hub throughput of a few hundred thousand events/s, however this is proving to be quite difficult using the node sdk. I have attempted to use batching to better control the sending but with 5 clients and a batch size of ~500 events/batch I end up running into this error after around 3 minutes of running my script. Any help pushing significant throughput to Event Hub via the node sdk will be greatly appreciated. |
I started looking into this today, and found that at some point the underlying connection has its remote state reset. This can happen when Sometimes this isn't a problem because the remote state is repopulated once the links are reattached by rhea. However if the send timeout is hit before this happens, there's a TypeError thrown because that remote state doesn't have the source field defined which is where the address comes from. So now the question is, why is connect being called multiple times like this? I can tell that it is being triggered inside the cbs init() method, but I'm not sure yet why that's being called more than once. One easy 'fix' would be to submit a PR to rhea-promise so that it wraps the |
In my test case I'm seeing the following take place:
I think we can work around this if we use a new rhea-promise connection when we detect that we are going to call |
The fix for this issue is now available in Here's some more info on all the changes that went into this version: |
Recently I was testing the impact of creating batches and sending them faster than the service could accept them using the EventHubProducerClient in
@azure/event-hubs
v5.As expected, memory usage increased and eventually I could see that some of the send calls would time out.
However if I let the script continue long enough, I would eventually see an uncatchable error thrown by rhea-promise:
The error is being thrown from a function that is triggered by a setTimeout. The function is meant to be treated as an operation timeout, and throws an error that includes the sender's address in the message. The getter for the
address
property fails because the link'ssource
property is undefined.This issue is meant to track the investigation into how the rhea-promise awaitable sender can get into a state where
source
is undefined, and if needed either log an issue or create a PR to fix this in rhea-promise.Script used to reproduce issue:
The text was updated successfully, but these errors were encountered: