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

Cloud Run Service - Processing continued after timeout

Hello,

We are using Cloud Run Service to process requests, and the process continued after a timeout. This has happened only once so far.

Here is what happened at the time as confirmed from the instance log:
The first request started at 6:55 and ended at 7:55
The second request started at 8:00 and ended at 8:50.

In the instance log, the first request ended with 504 after a 60 minute timeout, then the instance started processing the second request.
However, checking the log of events on the first request, it appears that the processing was running at least until 8:21 (we upload and store event logs to Firestore).

We have been using the Cloud Run service for several years and this is the first time this has happened.
Is it possible that this kind of problem could occur? What can we do to resolve it?

3 1 268
1 REPLY 1

Hello @hrkngt,

Welcome to the Google Cloud Community!

As mentioned in the documentation:

For a timeout longer than 15 minutes, Google recommends implementing retries and making sure the service is tolerant to clients re-connecting in case the connection is lost (either by ensuring requests are idempotent, or by designing request handlers in such a way that they can resume from the point where they left off). The longer the timeout is, the more likely the connection can be lost due to failures on the client side or the Cloud Run side. When a client re-connects, a new request is initiated and the client isn't guaranteed to connect to the same instance of the service.


There could be an instance where the client reconnected then initiated a new request. If the problem persists, you can report an issue. Check out the Issue tracking system and product feature requests

You can also contact Google Cloud Support to further look into your case. Hope it helps, thanks!

Top Solution Authors