Skip to content

Conversation

@larryrider
Copy link
Contributor

  • Limited WebDAV concurrent petitions to avoid backend timeouts

@larryrider larryrider self-assigned this Dec 24, 2024
@sonarqubecloud
Copy link

@larryrider larryrider marked this pull request as ready for review January 13, 2025 08:59
@sg-gs
Copy link
Member

sg-gs commented Jan 13, 2025

@larryrider

I think you misunderstood the timeout issue. The issue could happen more frequently when you do long-lived requests, but even in small requests, the timeout can happen and it is not a matter of the number of concurrent uploads in this case.

The issue is that the connection could be stalled, due to a variety of reasons. As multipart transfers allow to repeat just the transfer of a chunk (either download or upload) if it fails or is stalled, you need to control precisely that and if happens, re-attempt the request.

TL;DR: You need to set the timeout max allowed seconds on the library doing the transfer. Often it's https (Node.js native) which has a parameter for that. This requires a change that involves the library you are using to perform uploads (inxt-js)

@larryrider
Copy link
Contributor Author

@larryrider

I think you misunderstood the timeout issue. The issue could happen more frequently when you do long-lived requests, but even in small requests, the timeout can happen and it is not a matter of the number of concurrent uploads in this case.

The issue is that the connection could be stalled, due to a variety of reasons. As multipart transfers allow to repeat just the transfer of a chunk (either download or upload) if it fails or is stalled, you need to control precisely that and if happens, re-attempt the request.

TL;DR: You need to set the timeout max allowed seconds on the library doing the transfer. Often it's https (Node.js native) which has a parameter for that. This requires a change that involves the library you are using to perform uploads (inxt-js)

Oh I see.. Even so, I believe this change can help avoid overwhelming the system with multiple calls, as it handles concurrent WebDAV calls to avoid an overload of requests to the backend.

Additionally, I've submitted another PR that implements multipart uploads, which I believe will significantly improve the issues we've been encountering.

The solution that implements retries for individual chunks that you mentioned looks good for me, we can implement it in another task too

@larryrider
Copy link
Contributor Author

closing it as this task was already fixed in other PR

@larryrider larryrider closed this Apr 17, 2025
@larryrider larryrider deleted the feat/limit-concurrent-webdav-petitions branch July 1, 2025 16:43
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 this pull request may close these issues.

3 participants