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
Functions that run longer than 8 seconds return empty replies. #94
Comments
It's awesome to see you guys testing FaaS - the limit here is in the gateway rather than the watchdog which I think you've set up correctly. I think I'd consider anything over a few seconds to be asynchronous and that's something I want to tackle through the roadmap. An asynchronous item would probably return instantly with an ID and allow polling or call back to a URL on completion. For the time being you could get past the 8 second limit by hacking Here's the line you'd want to edit - https://github.com/alexellis/faas/blob/master/gateway/server.go#L65 If you run the ./build.sh file you'll get an image you can swap into your docker-compose file for the gateway called "functions/gateway:latest-dev" Does that help? |
Taking a look right now -- thanks alex! |
Built and tagged it in our private registry. I'll look at adding some config options for the gateway. |
That's awesome! Thanks for the quick reply, Alex!
…On Jun 29, 2017 4:48 PM, "leigh schrandt" ***@***.***> wrote:
Built and tagged it in our private registry.
Changing those values works 👍
I'll look at adding some config options for the gateway.
A pathPrefix for all of the routes would be helpful in addition to these
timeouts.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#94 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKO3N0k7Pe0WHsaq_SMU4vG6oYjWcpqfks5sJDedgaJpZM4OJ4BC>
.
|
Great. Would be interesting to see a minimal example of the scraping contributed online somewhere or as a blog. Btw you might find the faas-cli useful too - https://blog.alexellis.io/build-and-deploy-with-faas/ What are you thinking re: a path prefix? |
I still have a draft blog-post for some linuxkit usage on windows I never finished :/ For the path Prefix stuff, I was thinking setting
Not sure what the best way to do this is in |
I'm guessing that for the gateway config, we'd do something similar to what's implemented in |
I'm not sure about the Prometheus If you're running Prometheus in the network, it's easier to just leave it unchanged, but from outside, it could be problematic to route to. |
For now let's look at the timeout config in this issue. Feel free to open separate threads. |
I'm confused as to why there are two levels of timeout. If not, I'd suggest we set the request's timeout values to match the function's service spec if present. |
@stealthybox do you want to open another issue to talk about your idea re- prefixes? |
Yep! |
@stealthybox @cgpuglie closing this re: fix in #95 #96 - thanks for contributing and hope to see you in the Slack channel. Did you want to raise another issue to discuss a path prefix? |
Long running functions (8+ seconds) return with empty responses.
Expected Behavior
STDOUT should be returned in the response body.
Current Behavior
The response body is empty.
Steps to Reproduce
Deploy faas.
Create the following files:
func.yml
func.sh
This function takes a number as input and sleeps for that duration before responding.
Let's deploy it:
And curl the service to run for different lengths:
The test cases for 8 and 9 seconds still return a response, but the response is empty.
Context
@cgpuglie and I are trying to run a web-scraper with nightmare-js as a faas function.
The runtime is variable, but typically longer than 8 seconds.
Your Environment
The text was updated successfully, but these errors were encountered: