Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set expanded timeouts? #205

Closed
4 of 5 tasks
ctwkongmu opened this issue Nov 25, 2021 · 5 comments
Closed
4 of 5 tasks

How do I set expanded timeouts? #205

ctwkongmu opened this issue Nov 25, 2021 · 5 comments

Comments

@ctwkongmu
Copy link

My actions before raising this issue

The timeout settings in helm values.yml(readTimeout, writeTimeout) seems not to override function timeouts as stated in workshop:

There is also a maximum timeout duration set at the gateway and it will override the function timeout. At the time of writing the maximum timeout is configured at "20s", but can be configured to a longer or shorter value.

Expected Behaviour

After update the timeout settings in helm values.yml(readTimeout, writeTimeout) and run helm upgrade, the function timeouts should be changed accordingly.

Current Behaviour

After change helm values.yml(readTimeout, writeTimeout) and run helm upgrade, the values changed in gateway (verified by env in gateway container).
But the timeout in function seems to be the unchanged.
This is verified by restart the function pod in openfaas-fn namespace and check the logs

2021/11/25 09:07:23 Version: 0.2.0	SHA: 56bf6aac54deb3863a690f5fc03a2a38e7d9e6ef
2021/11/25 09:07:23 Timeouts: read: 5s write: 5s hard: 0s health: 5s.
2021/11/25 09:07:23 Listening on port: 8080

Are you a GitHub Sponsor (Yes/No?)

Check at: https://github.com/sponsors/openfaas

  • Yes
  • No

List All Possible Solutions and Workarounds

Workaround:
Add the function timeout under the environment in function.yml file.

Which Solution Do You Recommend?

Not a solution, but, maybe instead of letting the settings in values.yml to override function settings, shouldn't it the the other way around?
(Cluster setting defines the default behavior while each function defines the specific behavior.)

Steps to Reproduce (for bugs)

  1. change helm values.yml(readTimeout, writeTimeout)
  2. run helm upgrade
  3. restart function pod
  4. check the log and timeout stays the same.

Context

I was encountering 503 on a long running function.
After I changed the timeout config the timeout still happens.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
    0.13.15

  • Docker version docker version (e.g. Docker 17.0.05 ):
    20.10.8

  • Are you using OpenFaaS on Kubernetes or faasd?
    Kubernetes

  • Operating System and version (e.g. Linux, Windows, MacOS):
    Using faas-cli on macos and cluster is on EKS.

  • Code example or link to GitHub repo or gist to reproduce problem:

  • Other diagnostic information / logs from troubleshooting guide

Next steps

You may join Slack for community support.

@alexellis
Copy link
Member

Hi @ctwkongmu thanks for your interest in openfaas.

The timeout values in values.yaml do not affect function timeouts, I'm not sure what led you to believe that, but if you have a link to the URL, we may be able to update it.

Here's a tutorial on how to set timeouts.

https://docs.openfaas.com/tutorials/expanded-timeouts/

Regards,

Alex

@alexellis
Copy link
Member

/add label: support,question

@alexellis
Copy link
Member

/set title: How do I set expanded timeouts?

@derek derek bot changed the title Timeout configs in Helm values.yml doesn't override function timeouts How do I set expanded timeouts? Nov 25, 2021
@alexellis alexellis transferred this issue from openfaas/faas Nov 25, 2021
alexellis added a commit that referenced this issue Nov 25, 2021
A user @ctwkongmu was confused about how to set timeouts
due to phrasing in lab8. This commit points to the expanded
timeout tutorial to remove any doubt.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis
Copy link
Member

I've updated the workshop to point at the tutorial.

You'd probably be better off using the more modern, Kubernetes-focused training material I wrote last year: https://www.edx.org/course/introduction-to-serverless-on-kubernetes

@ctwkongmu
Copy link
Author

@alexellis Thanks for the quick fix on the lab8 document. It is clear now.
And also many thanks for the training material, I will check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants