-
Notifications
You must be signed in to change notification settings - Fork 227
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
Unable to run sync route execution longer than 60 seconds #339
Comments
This is a bug. The problem is that there is a hard-coded 30s timeout in the source code. functions/api/server/runner.go Line 172 in c14bc32
@treeder @pedronasser @seiflotfy - what would the appropriate fix? Is the timeout an attribute of the route or the task call? |
@ccirello would be the right fix to set execution timeout through API? There are three cases possible:
|
I don't see any other place to land the fix. :) It must be in the API - the only you way you can interface with IronFunctions daemon. However, is this an attribute of the route ( |
@ccirello as i can see, it should be a part of |
I think the Timeout should be configured in the route/apps configuration and even maybe via a Header. If no timeout is specified use the default. (like @denismakogon suggested) |
@pedronasser to what kind of headers you're referring to?. We already have |
Container unexpectedly dies during sync execution but runs fine in docker using command after 1 minute execution:
docker run -d -i -P denismakogon/aioservice-examples:latest
Images:
Steps to reproduce:
curl -X POST -d '{"app":{"name":"testapp"}}' localhost:8080/v1/apps
curl -X POST -d '{"route":{"type": "sync", "path": "/sync", "image": "denismakogon/sleep120"}}' localhost:8080/v1/apps/testapp/routes
curl -X POST localhost:8080/r/testapp/sync
Function logs:
When POST to /r/{app}/route submitted
When container dies
But both containers are capable to run on Docker successfully.
It appears that sync func can run no longer than 60 seconds (Docker ReST client default HTTP timeout is 60 seconds).
Functions latest commit: af14904
Go version: 1.7
Docker version: 1.12.3, build 6b644ec
The text was updated successfully, but these errors were encountered: