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

"Connection timed out after 2000ms" #140

Open
stevage opened this issue Apr 3, 2019 · 2 comments
Open

"Connection timed out after 2000ms" #140

stevage opened this issue Apr 3, 2019 · 2 comments

Comments

@stevage
Copy link
Contributor

stevage commented Apr 3, 2019

I am consistently getting message when attempting to upload a largeish (50MB) tileset. It always times out somewhere between 50 and 80 seconds after starting the upload:

4427 tiles @ 60/s, 21% complete [73s]
Connection timed out after 2000ms

Passing --timeout X doesn't seem to make any difference. (I suspect --timeout doesn't apply to the upload, but to something else).

Any ideas? Maybe it's something like after so many connections it starts taking a while to create new ones, then this 2 second cutoff kicks in?

@stevage
Copy link
Contributor Author

stevage commented Apr 3, 2019

Hmm, the source is fairly easy to find. In @mapbox/tilelive-s3:

        source.client = uri.client || new AWS.S3({
            s3ForcePathStyle: !!process.env.AWS_S3_ENDPOINT,
            region: source.region,
            endpoint: process.env.AWS_S3_ENDPOINT,
            maxRetries: 4,
            httpOptions: {
                timeout: 2000,
                agent: defaultAgent
            }
        });

2 seconds seems like a pretty aggressive timeout. I guess the issue now is to somehow make that configurable?

@stevage
Copy link
Contributor Author

stevage commented Apr 3, 2019

Huh. I have now discovered this was addressed here and it actually is configurable.

Solution: add ?timeout=10000 onto the end of the S3 URL.

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

1 participant