Rhino Compute App Server timeout

Hello everyone, @will
I am running compute on an AWS instance with the appserver on heroku as recommended by the videos. I am trying some long computations, approx 1 min long, but I keep getting a “timeout” error on the appserver console in heroku:

2021-04-27T22:27:08.581852+00:00 heroku[router]: at=error code=H12 desc=“Request timeout” method=POST path="/solve" host=… request_id=acafad23-288c-4fdc-a4aa-b030b33bc385 fwd=12.34.56" dyno=web.1 connect=0ms service=30003ms status=503 bytes=0 protocol=https

Is there any setting in the app server I can change to modify the timeout time? I can see the computation finishing on the rhino compute instance successfully, and when the parameters give a short enough computation the response does get sent to the browser. This does not happen when testing locally, only when deploying to a remote machine.
Any suggestions? They would be greatly appreciated

Heroku’s router will timeout after 30s. This isn’t configurable so you’ll need to either change the way that the server communicates (by implementing something like HTTP long-polling or background tasks) or else use a different service to serve your application.

1 Like

Yeah I had just come to the same conclusion and was about to write when I saw your answer :grinning: Thank you so much anyways @will ! Guess I will have to change the way the server handles the requests.And maybe this post will save some people some unnecessary headaches :sweat_smile:

1 Like

I wonder if something like this would work without requiring any changes to the client…

https://spin.atomicobject.com/2018/05/15/extending-heroku-timeout-node/