Long lived GET requests in Google AppEngine

Viewed 319

I am building a web application on AppEngine python flexible environment that returns a constant stream of output when GETtting that given endpoint.

I have set in the app.yaml, the timeout parameter in the gunicorn command to a sufficiently high value.

entrypoint: gunicorn -b :$PORT -t 3600  app:app

but after roughly 300 seconds, the client receiving the data receives an incomplete read error, as if the connection was closed:

requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

I am using Requests library and using the stream=True option.

From what I can see in GAE documentation in the section of response limits, the limit time is 1 hour, so it should be OK.

Could it be that the Nginx timeout should be set in another parameter?

0 Answers
Related