Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

increase read timeout for larger discovery docs #192

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cmaan
Copy link

@cmaan cmaan commented Jan 22, 2021

This fixes GoogleCloudPlatform/endpoints-framework-gradle-plugin#99

It seems, the current deployment of google-api-client-libraries.appspot.com is not limited to the GAE Standard 60 sec request timeout anymore.

@@ -61,7 +61,7 @@ InputStream postRequest(String url, String boundary, String content) throws IOEx
HttpRequestFactory requestFactory = new NetHttpTransport().createRequestFactory();
HttpRequest request = requestFactory.buildPostRequest(new GenericUrl(url),
ByteArrayContent.fromString("multipart/form-data; boundary=" + boundary, content));
request.setReadTimeout(60000); // 60 seconds is the max App Engine request time
request.setReadTimeout(600000); // Larger discovery documents require more than 20 sec to process
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is surprising. More than a minute seems like something has gone wrong and the request should time out. None of our docs should be nearly large enough to go over a minute.

Copy link
Author

@cmaan cmaan Mar 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's just a combination of a larger discovery doc and a smaller compute core. We gradually hit the limit once in a while, with increasing frequency as our discovery doc grew. We have 295 endpoints currently.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elharo We've since reduced our discovery doc, but still run 50 sec and hit the limit once in a while with the upstream version. Are there any internal things you'd need to check on why this takes so long? From our perspective, increasing the timeout should be fine. Anyway, in case increasing the timeout is not viable upstream, the comment 60 seconds is the max App Engine request time is not true anymore, the max App Engine request time is now 10 min.

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

Successfully merging this pull request may close these issues.

Failed to generate client library: Read time-outs
2 participants