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

Assets download error ECONNRESET #268

Open
Natoune opened this issue Jun 5, 2023 · 2 comments
Open

Assets download error ECONNRESET #268

Natoune opened this issue Jun 5, 2023 · 2 comments

Comments

@Natoune
Copy link

Natoune commented Jun 5, 2023

When I run the assets download (with installDependenciesTask()) I get many errors like this:

Error: read ECONNRESET
       at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) {
     errno:-4077,
     code: 'ECONNRESET',
     syscall: 'read',
     url: 'https://resources.download.minecraft.net/89/893e37d8d608cccd9c2404e785597c6a7c5f3593'
}

Coming from line 556 of @xmcl/file-transfer/dist/index.js

But when I try again to download the assets with my 4G and not my WiFi, it works...

Do you know where this problem can come from?

Thanks

@ci010
Copy link
Collaborator

ci010 commented Jun 12, 2023

Guess you can try to limit the undici connection count. Connection reset usually means the server rejecting your request since you request too much or keep a connection too long.

I also encounter this issue sometime. So I think this is an open question about how to avoid this case.

@Faeranne
Copy link

Faeranne commented Jul 4, 2023

As I'm also having the same issue (and would rather not just rely on rerunning the tasks several times), I'm curious how one would go about limiting the connection count? I see Undici has a Pool option, but I'm not seeing that being used here, so I'm curious how to enable that limit? Or is this a case where there is no way, and if so, would a connection limit option be a safe-ish fix for this?

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

No branches or pull requests

3 participants