0

Is there a way to set or configure the timeout of endpoints in Cloud Endpoints? I believe the default is 60 but is there a way to change this?

Note: this is a Java project.

Micro
  • 10,303
  • 14
  • 82
  • 120
  • Does this [SO answer link](https://stackoverflow.com/a/61600086/10190802) answer your question? – Darwin Aug 04 '22 at 00:03
  • @Darwin Somewhat, I am still unsure how to set this deadline in my endpoints project. Which file do I add the `deadline` property in? – Micro Aug 04 '22 at 02:35
  • you can add it in the yaml file just like this [example](https://github.com/GoogleCloudPlatform/endpoints-quickstart/blob/master/openapi.yaml) then you can add the `x-google-backend:` key after `operationId` in line 28. – Darwin Aug 07 '22 at 23:11
  • This is another [sample yaml file](https://cloud.google.com/api-gateway/docs/secure-traffic-gcloud#creating_an_api_config) that uses the `x-google-backend` to set `deadline`. Note that the link is for `API Gateway` service. – Darwin Aug 07 '22 at 23:16

1 Answers1

0

As I mentioned in the comment, you can add the deadline property to configure timeouts in the yaml file just like this example then you can add the x-google-backend: key after operationId in line 28

This is another sample yaml file that uses the x-google-backend to set deadline. Note that the link is for API Gateway service.

Darwin
  • 450
  • 4
  • 11
  • My endpoints application actually does not have an `openapi.yaml` file. It still works all the same. Also I forgot to mention it is a Java project. Does that change things? Is there a link to the documentation of the `deadline` property? – Micro Aug 12 '22 at 22:32
  • This is the only link that I could find on [`deadline` property](https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#deadline). Please note that `deadline` property is a new feature in **ESPv2** and not supported by **ESP** – Darwin Aug 16 '22 at 03:29