# Backend Service Timeouts on GCP

**URL:** https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398
**Category:** General Discussions
**Created:** [December 4, 2023, 12:07pm UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398 "2023-12-04T12:07:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dbasner](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dbasner/32/1373_2.png) [@dbasner](https://hub.mender.io/u/dbasner)
#### Post date: [December 4, 2023, 12:07pm UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/1 "2023-12-04T12:07:14Z")

</div>

Hi!

I have found something missing in the doc. I first suspected an error on server/client side but it actually had something to do with my cluster, which is:

On GCP, when deploying mender using helm, the ssh connection always timeouts after ~ 30 seconds. The reason for that is a missing backendConfig in kubernetes. What needs to be done is applying the following yaml to k8s

```auto
apiVersion: cloud.google.com/v1beta1
kind: BackendConfig
metadata:
  name: ws-timeout-backend-config
spec:
  timeoutSec: 90

```

followed by an additional annotation to the mender-api-gateway service, which is

```auto
cloud.google.com/backend-config: '{"default": "ws-timeout-backend-config"}'

```

Hope this helps some of you out there. Of course, you can set the timeout to more than 90 seconds, more information can be found here [in the load-balancing doc](https://cloud.google.com/load-balancing/docs/https#timeout-bes)

---

<div class="post-metadata">

### Author: ![robgio](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/robgio/32/1760_2.png) [@robgio](https://hub.mender.io/u/robgio)
#### Post date: [December 4, 2023, 1:05pm UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/2 "2023-12-04T13:05:37Z")

</div>

Hi @dbasner ,  
thanks for your note and the solution, this is really helpful!

---

<div class="post-metadata">

### Author: ![oldev](https://avatars.discourse-cdn.com/v4/letter/o/3be4f8/32.png) [@oldev](https://hub.mender.io/u/oldev)
#### Post date: [December 6, 2023, 9:00am UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/3 "2023-12-06T09:00:07Z")

</div>

Hi,

I ran into a similar issue on Azure with AKS and Application Gateway as Ingress.

Here’s the fix for the Applicaiton Gateway Backend Setting using an annitation:

```auto
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:  
  annotations:
    kubernetes.io/ingress.class: azure/application-gateway
    appgw.ingress.kubernetes.io/request-timeout: "90"
...

```

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [December 6, 2023, 9:02am UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/4 "2023-12-06T09:02:20Z")

</div>

Thanks @dbasner and @oldev for the feedback. Is this something that could go into the helm charts? Or am I mistaken here?

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![oldev](https://avatars.discourse-cdn.com/v4/letter/o/3be4f8/32.png) [@oldev](https://hub.mender.io/u/oldev)
#### Post date: [December 6, 2023, 9:10am UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/5 "2023-12-06T09:10:41Z")

</div>

Looks like it does not make much sense to include these in the helm chart.

AFAIK, the Ingress.yaml is not part of the helm chart. And exposing the cluster is the responsibility of the operator.

see section Exposing the service:  
[https://docs.mender.io/3.6/server-installation/production-installation-with-kubernetes/mender-server#exposing-the-service](https://docs.mender.io/3.6/server-installation/production-installation-with-kubernetes/mender-server#exposing-the-service)

But there could be a hint in the " Exposing the service" documentation, that the mender-connect ping is hardcoded to 60 seconds.  
[https://docs.mender.io/add-ons/remote-terminal/troubleshoot#remote-terminal-sometimes-not-working](https://docs.mender.io/add-ons/remote-terminal/troubleshoot#remote-terminal-sometimes-not-working)

---

<div class="post-metadata">

### Author: ![robgio](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/robgio/32/1760_2.png) [@robgio](https://hub.mender.io/u/robgio)
#### Post date: [December 6, 2023, 9:36am UTC](https://hub.mender.io/t/backend-service-timeouts-on-gcp/6398/6 "2023-12-06T09:36:09Z")

</div>

I agree that exposing the cluster is the responsibility of the operator. However, the ingress is actually included in the Helm Chart: [https://github.com/mendersoftware/mender-helm/blob/master/mender/values.yaml#L79](https://github.com/mendersoftware/mender-helm/blob/master/mender/values.yaml#L79)

By default it’s disabled, but you can enabled it and provide custom annotations as required.
