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

Chunk timeout #310

Closed
siovene opened this issue Jun 25, 2021 · 4 comments · Fixed by #311
Closed

Chunk timeout #310

siovene opened this issue Jun 25, 2021 · 4 comments · Fixed by #311

Comments

@siovene
Copy link

siovene commented Jun 25, 2021

Is your feature request related to a problem? Please describe.
I would like to have a way to specify a certain timeout for a chunk, after which it should be retried.

Describe the solution you'd like
A chunkTimeout option, in seconds. If a PATCH request doesn't get a response from the server in that time, the chunk should be retried.

Describe alternatives you've considered
None.

Additional context
None.

Thanks!

kukhariev added a commit that referenced this issue Jun 25, 2021
kukhariev added a commit that referenced this issue Jun 25, 2021
kukhariev added a commit that referenced this issue Jun 25, 2021
@kukhariev
Copy link
Owner

Hi @siovene , what if I add a timeout to all requests?

retryConfig: { timeout: 10_000 }

@siovene
Copy link
Author

siovene commented Jun 26, 2021

Hi @kukhariev, maybe retryConfig is what I need. Could you please add documentation about what it does exactly, to the README file? (PS: maxChunkSize should probably be documented in README next to chunkSize).
Thanks!

kukhariev added a commit that referenced this issue Jun 29, 2021
* fix: add timeout option

closes #310

* docs: update
@kukhariev kukhariev reopened this Jul 11, 2021
@kukhariev
Copy link
Owner

Hi @siovene,

// force getOffset() on http errors and repeat request on network errors
this.responseStatus >= 400 && (this.offset = undefined);

After a timeout error a full chunk will be sent again. Is that okay?

@siovene
Copy link
Author

siovene commented Jul 11, 2021

Hi @kukhariev, yes, I would say that it's inline with the expectation: by default, a timeout is treated as a "retry" error. Then the flow will continue according to retryConfig (e.g. max attempts).

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

Successfully merging a pull request may close this issue.

2 participants