-
Notifications
You must be signed in to change notification settings - Fork 91
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
WriteApi blocking for up to 30s when InfluxDB is down #623
Comments
Hello @constantins2001, Thank you for using our client. I wanted to address your concern about managing data writes to InfluxDB, especially in scenarios where you require immediate feedback for each write operation. The For scenarios requiring immediate acknowledgment from InfluxDB for each write, I recommend using the Here's an example to get you started: WriteApiAsyncExample. This example demonstrates how to use WriteApiAsync to write data and asynchronously wait for a response, providing a clear pattern for implementing similar functionality in your application. If you have any further questions or require additional assistance, please feel free to reach out. Best Regards. |
Hi @bednar, I know about the AsyncWriteApi, but it does not suite my use case. I'm writing many data points (metrics of a running service) to InfluxDB. I don't care if they are received or not. This isn't the case when InfluxDB is down. Specifically, the pipeline sending to InfluxDB isn't accepting new entries while retrying, thus blocking all WriteApi callers for up to retry_window (30s). This is unacceptable for my use case. As a temporary workaround I'm wrapping the write with Thread.Run, but that's only a temporary solution as it will result (rather sooner than later) in ThreadPool starvation. Best regards |
Please reopen |
Steps to reproduce:
Expected behavior:
Even if InfluxDB is down, the Synchronous API doesn't block
Actual behavior:
When InfluxDB is down, the Synchronous API block for up to 30s
Specifications:
The text was updated successfully, but these errors were encountered: