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

Starting streaming jobs via mist-cli / rest api results in 504 timeout #458

Open
austinnichols101 opened this issue Mar 15, 2018 · 2 comments

Comments

@austinnichols101
Copy link

austinnichols101 commented Mar 15, 2018

Streaming jobs start, but return a 504 timeout because they do not return a result (they run forever). Streaming jobs need special handling...

$ curl -s --data '{}' -H 'Content-Type:application/json' -X POST http://myserver:2004/v2/api/functions/myfunction/jobs?force=true

<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.13.8</center>
</body>
</html>
Job succeeded
@mkf-simpson
Copy link
Member

The force parameter keeps your http connection alive until your job returns a response. You can run jobs without the ?force=true parameter, this will work asynchronously.

@austinnichols101
Copy link
Author

I will try that - thanks.

As an enhancement, I think calling a streaming function should return started/failed/etc .

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