Search code examples
google-cloud-functionsgoogle-cloud-endpointsgoogle-cloud-endpoints-v2

ESPv2 with Google Cloud Functions upstream request timeout


I'm having issue getting answers from a Google Coud Function going through ESPv2. Every time I request it, I get a response 15 seconds later with a status code of 504. My function take between 30 to 45 seconds. In the logs the functions correctly and answer back after 35 seconds.

Is there a way to increase the timeout in ESPv2 ?

Thanks


Solution

  • For anyone else having this issue, in the openapi-functions.yaml under the x-google-backend you should had the attribut deadline and set it to whatever value in seconds you want.

    Here is the hidden documentation https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#deadline

    Issue related: https://github.com/GoogleCloudPlatform/esp-v2/issues/4