Skip to content
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

Custom sTimeout value #32

Closed
murathatipoglu opened this issue Dec 6, 2023 · 5 comments
Closed

Custom sTimeout value #32

murathatipoglu opened this issue Dec 6, 2023 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@murathatipoglu
Copy link

Hi,

Here is the default msSweep, sTimeout, and maxTry values are set

"post": {msSweep: 16, sTimeout: 10, maxTry: 1},
"put": {msSweep: 16, sTimeout: 10, maxTry: 1},
"delete": {msSweep: 16, sTimeout: 10, maxTry: 1},
"get": {msSweep: 16, sTimeout: 3, maxTry: 6},
}

I understand for post, put, delete the maxTry should be left as 1 to avoid any repetition of the same modification request.

IS it possible to set a higher sTimeout value when communicating with Solid Server API through terraform provider? We are frequently getting errors from Solid Server API and deployment pipelines using Solid Server terraform provider fails. Most of the time re-run of the pipeline succeed. Sometime it requires third or fourth re-run

We mainly use DNS RR resource. Is there way to set timeout to a higher value at general provider level settings or specifically for dns rr resource level?

Thank you.

@alexissavin alexissavin added the help wanted Extra attention is needed label Dec 11, 2023
@alexissavin
Copy link
Collaborator

Hello @murathatipoglu,

I would better recommend you to adjust the number of concurrent operations performed by terraform using the option "-parallelism = " or the TFE_PARALLELISM environment variable.

Default value is 10 which, depending on your TF script, can trigger a lot of operations. Maybe consider using a lower value such as 4 or even 2.

Kind regards

@murathatipoglu
Copy link
Author

murathatipoglu commented Dec 11, 2023

Hi @alexissavin

Thanks for your kind reply and recommendation

The API endpoint on solid server side is getting number of concurrent queries from different sources. Thus, lowering parallelism would not help to lower load on server side.

By the way, we created a custom copy of the provider and changed the sTimeout to higher values. That fixed the issue and not getting errors caused by hitting timeout. However, it is not our preference to create a side path use custom provider.

The workload running pipeline/deployment is running in public cloud environment where solid server is in an on-prem data center. There is a latency in between and we believe "3 seconds" is -sometimes- not enough and should be set to a higher value. Our test with a custom copy of provider supports this theory.

Is there a way to pass custom sTimeout value to solid server provider (or DNS_rr resource)? Or are those values are statically fixed in terraform-provider-solidserver/solidserver/soliderver.go file? (

"post": {msSweep: 16, sTimeout: 10, maxTry: 1},
"put": {msSweep: 16, sTimeout: 10, maxTry: 1},
"delete": {msSweep: 16, sTimeout: 10, maxTry: 1},
"get": {msSweep: 16, sTimeout: 3, maxTry: 6},
}
)

As far as I see, it is the second case. Would it be possible to add support for passing those values as parameters to the provider in TF code.

Best regards.

@alexissavin
Copy link
Collaborator

Hello,

Latest commit introduce a provider option to set the default API timeout value.

Let me know if it works as expected, if so, I will make it available it in the next release.

Kind regards

@murathatipoglu
Copy link
Author

murathatipoglu commented Dec 12, 2023

Thanks very much Alex. I checked latest two commits that introduce new Timeout parameter and replace static 10s and 3s timeout values with the new dynamic parameter. That is exactly what I was looking for. You're awesome!

@alexissavin alexissavin added the enhancement New feature or request label Feb 23, 2024
@alexissavin
Copy link
Collaborator

Addressed in v1.1.21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants