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

Empty response when payload is bigger than 1MB #1794

Closed
4 of 5 tasks
lapwat opened this issue May 11, 2023 · 2 comments
Closed
4 of 5 tasks

Empty response when payload is bigger than 1MB #1794

lapwat opened this issue May 11, 2023 · 2 comments

Comments

@lapwat
Copy link

lapwat commented May 11, 2023

My actions before raising this issue

Why do you need this?

I am trying to get a response back from my function.

Who is this for?

What company is this for? Are you listed in the ADOPTERS.md file? No

Expected Behaviour

I would like to be able to get an answer from the function even if the payload is bigger than 1MB.

Current Behaviour

I have the following error message:

Can't reach service: xxx

When the response size of my serverless function is bigger than 1MB.

Are you a GitHub Sponsor (Yes/No?)

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

  • Yes
  • No

List All Possible Solutions and Workarounds

Is there a way to increase the 1MB nats limit from Openfaas Helm Chart ?

Context

If the response payload is under 1MB it works well.

If I build and run the function locally with docker run it works well.

I think that the problem might come from the NATS payload size limit referenced here

https://docs.openfaas.com/reference/async/#configuration-limits

Logs

2023/05/11 14:14:48 Forking fprocess.
2023/05/11 14:14:49 Wrote 3753 Bytes - Duration: 0.660251s ==> SUCCESS
2023/05/11 14:16:16 Forking fprocess.
2023/05/11 14:16:19 Wrote 1560412 Bytes - Duration: 2.905908s ==> FAILED with `Can't reach service`

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
CLI:
 commit:  0b1e92baf1377cc64c89b131fb3b227105f115da
 version: 0.16.3
  • Docker version docker version (e.g. Docker 17.0.05 ): 23.0.5

  • Are you using OpenFaaS on Kubernetes or faasd?

OpenFaaS on Kubernetes installed with Helm Chart

  • Operating System and version (e.g. Linux, Windows, MacOS): Linux
@lapwat lapwat closed this as completed May 11, 2023
@alexellis
Copy link
Member

Hi @lapwat sounds like you have a misconfiguration in your timeouts.

The config-checker will show you that:

https://github.com/openfaas/config-checker

Or you can just follow this tutorial if you're on K8s:

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

@alexellis
Copy link
Member

In future, we can answer questions better when people give us steps to reproduce a problem. You didn't do that, so we weren't able to help you as much as you may have needed.

Alex

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