Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

GetInfluxDatabase_2 10 seconds timeout problem #158

Closed
Marco-Colombi opened this issue Mar 8, 2024 · 4 comments · Fixed by #163
Closed

GetInfluxDatabase_2 10 seconds timeout problem #158

Marco-Colombi opened this issue Mar 8, 2024 · 4 comments · Fixed by #163
Assignees
Milestone

Comments

@Marco-Colombi
Copy link

Hi there,

I'm experiencing a problem with the processor GetInfluxDatabase_2 in the 1.24.0 bundle version. The NiFi version is 1.19.0.

The Flux query that I'm sending takes more than 10 seconds, but after 10 seconds of elaboration the request times out, logging the error

  • "Failed to execute Flux query due SocketTimeoutException to class Query"
  • "java.net.SocketTimeoutException: timeout Caused by: java.net.SocketException: Socket closed".

I tried to change the parameter "InfluxDB Max Connection Time Out (seconds)" in the corresponding StandardInfluxDatabaseService_2 controller service to 60 seconds (or higher), but it still times out after 10 seconds.

immagine

It seems like it doesn't see this parameter for the timeout.

Do you know what is possibly causing this issue? Am I missing something?

Thanks a lot for your support. Any help would be much appreciated!

@bednar
Copy link
Contributor

bednar commented Mar 11, 2024

Hi @Marco-Colombi,

thanks for using our bundle.

Is this something you would be willing to help with? All PR is welcome and we will be happy to review your submission.

Best Regards

@bednar bednar added this to the 1.28.0 milestone Mar 11, 2024
@Marco-Colombi
Copy link
Author

Hi @bednar,

I was not able to understand where is the issue in your code. From your side, did you try to look at it and understand what is happening?

Thank you and kind regards

@bednar
Copy link
Contributor

bednar commented Apr 2, 2024

@Marco-Colombi, I think that the problem is here:

OkHttpClient.Builder builder = new OkHttpClient.Builder().connectTimeout(connectionTimeout, TimeUnit.SECONDS);

The should be something like:

OkHttpClient.Builder builder = new OkHttpClient.Builder()
        .writeTimeout(connectionTimeout, TimeUnit.SECONDS)
        .connectTimeout(connectionTimeout, TimeUnit.SECONDS)
        .readTimeout(connectionTimeout, TimeUnit.SECONDS);

Regards

@bednar
Copy link
Contributor

bednar commented Apr 22, 2024

Hi @Marco-Colombi,

I'm pleased to let you know that the issue you reported has been addressed in our latest pull request, which you can view here: PR #163 by @alespour.

To ensure that the fix resolves the issue as expected, could you please test it using our snapshot build? You can download the snapshot from the following link: NiFi-InfluxDB Bundle v1.29.0-SNAPSHOT.

Your feedback will be invaluable in confirming that everything is working correctly before we proceed with a more formal release. Please let us know how it goes.

Best Regards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants