Mouttie Dje
Mouttie Dje

Reputation: 53

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"
  ]
}

Upvotes: 3

Views: 3257

Answers (2)

Lakshmi
Lakshmi

Reputation: 195

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

Upvotes: 1

MBHA Phoenix
MBHA Phoenix

Reputation: 2217

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

Upvotes: 4

Related Questions