Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set maximum timeout for a step in GCP workflows

I have a workflow that calls some cloud functions, the timeout of the cloud function in question is 400 secs. When calling this function in google workflows it returns a timeout error (I saw that the default workflow timeout is 300 secs)

How can I change that ?

request timed out
in step "getMedicineUserTransformations", routine "main", line: 51
{
  "message": "request timed out",
  "tags": [
    "TimeoutError",
    "OSError"
  ]
}
like image 647
Mouttie Dje Avatar asked Oct 27 '25 10:10

Mouttie Dje


2 Answers

I suppose you have an HTTP function and you are using workflows http lib to call it. In this case the default timeout is 300s but you can increase it up to 1800s as stated in the documentation.

The request timeout, in seconds (default: 300.0). If the request takes longer than the timeout, a TimeoutError is raised. The maximum allowed timeout is 1800 seconds.

Ref: https://cloud.google.com/workflows/docs/reference/stdlib/http/get

And you can increase it by setting the timeout arg under args of your call: http.<method>

More details in the doc here : https://cloud.google.com/workflows/docs/http-requests#invoke-endpoint

like image 97
MBHA Phoenix Avatar answered Oct 30 '25 04:10

MBHA Phoenix


When the specified timeout is reached before the response is received that time “TimeoutError” will be triggered.So increase the timeout

like image 34
Lakshmi Avatar answered Oct 30 '25 03:10

Lakshmi