4

The current documentation (https://cloud.google.com/run/quotas#cloud_run_limits) states there is a 15 minute maximum timeout permitted (configurable) for a cloud run request.

Is this the limit on GKE as well, or may it be possible to configure GKE and the deployment to permit, say, a 90 minute timeout?

ahmet alp balkan
  • 42,679
  • 38
  • 138
  • 214
mohawkTrail
  • 606
  • 1
  • 7
  • 19
  • 4
    If you have a 90 minute job, I'd suggest looking into a more asynchronous mode of communicating the results of a job. That's a long time to expect a socket to stay open. – Doug Stevenson May 14 '19 at 23:01
  • 1
    In addition to Doug's comment, consider that Cloud Run pricing is designed for short-lived HTTP Request/Response (think 100 ms). Running requests for long periods of time may not be cost effective compared to other compute options. Also, requiring a connection to stay open for a long time increases connection failures which increases design complexity. Look into an asynchronous task-type design. Job goes into a queue and later you receive results. – John Hanley May 15 '19 at 04:26
  • Both fair comments, above. Do note, about costs, that I'm asking about Cloud Run on GKE – mohawkTrail May 15 '19 at 13:32
  • 1
    For context: . My goto for something like this is the (Genomics) Pipeline API, (nothing really about genomics). PAPI permits you to run an entry point into a container, on a VM the API will deploy on hardware to your specification. Optionally, one can name the files to localize and delocalize before and after the run. The service I'm thinking of is used to conduct a flurry of storage object transfers, and because most of them will be GCS bucket to bucket, they each will be finished in small minutes. Some, though, going to AWS, or potentially on-prem, may take exceptionally long time. – mohawkTrail May 15 '19 at 14:56
  • Since you are deploying on Kubernetes, skip Cloud Run. You can then configure whatever you want. – John Hanley May 15 '19 at 16:17
  • Well, if you have to upload a gig to the cloud that is going to take a long time. So how are we supposed to manage that if we have a time limit? – bobsmith76 Jul 01 '22 at 05:41
  • We can't use many services like Google Video Intelligence API because there's no pub sub... – Oliver Dixon Mar 03 '23 at 10:07

1 Answers1

6

The request timeout for Cloud Run on GKE services can go beyond 15 minutes.

You can change this using the --timeout flag: gcloud beta run services update [SERVICE] --timeout=[TIMEOUT]

Read more about setting request timeouts in the official documentation.

Steren
  • 7,311
  • 3
  • 31
  • 51