We are attempting to use the Events and State API from a Python comnmand-line application. Our code is based on the
EventsAndStateWebSocketApiPython protocol sample.
We boot a test server and can query the API on that machine fine. However, if we don’t send a query for around 20 minutes, subsequent attempts then result in the websocket connection throwing an exception with “server rejected WebSocket connection: HTTP 500”. If we restart the machine, it accepts connections again.
As a test I set up a loop to send the query every five minutes, and the API responded as expected. So it looks like there’s some sort of inactivity timeout.
Is this the case, and if so, is there a mechanism for configuring that timeout? Or ideally turning it off so the API always accepts requests?
(The server is freshly provisioned and AFAIK there’s nothing like antivirus or firewall which could be getting in the way. And like I say, it does accept websocket connections initially.)
Thanks for any assistance.