Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

API Gateway 504 timeout

Hi, I am new to GCP and in a recent project, I have configured an API Gateway with a Google cloud function. The function runs just fine in approximately 15 seconds, but the API Gateway give 504 errors roughly 4 out of 5 times. I am trying to understand why out of the documentation, but the only thing I have found is about "cold starts", but they talk about a 3 to 5 seconds delay not errors. Even in the logs it just says "response timeout". 

 

0 3 362
3 REPLIES 3

i am facing the same issue please can you share how you fixed it

Hi @Guglielmo , this is an Apigee forum so not really focused on API Gateway.. but just an idea, have you triple-checked your Open API spec, specifically that the x-google-backend is set correctly as specified here

Also maybe try another region to see if you can reproduce the problem..