We're streaming LSEG data using the LSEG Data Library for Python, using lseg.data.content.pricing.
Sometimes— seemingly at random (different times of day, sometimes after streams have been up for hours, other times after just minutes), we receive Stream.on_status events with the following (example) payload:
status: {'ID': 8, 'State': {'Code': 'ConnectionError', 'Data': 'Suspect', 'Stream': 'Closed', 'Text': 'Timeout'}, 'Type': 'Status'}
name: AAPL.ITC (or, e.g., BEI_u.TO, 7203.T at various points))
Now when we have a session disconnect (we receive a Session.on_event with an EventCode like SessionDisconnected, SessionConnected, Stream Disconnected, or StreamConnected), typically what happens is the system auto-reconnects. We've even tested this by inducing failures (for example, by unplugging the network cable, letting the error happen, and plugging it back in). This is obviously ideal.
But for these stream disconnects, it seems like the problem is at the head-end… we're not seeing any other problems on the PCs. And the connections never restore, so it seems we're responsible for doing reconnection logic in this case.
So some questions:
1) The message says this is a "timeout"— what is being timed out? Did the headend just stop sending us data? Is there any way to detect a timeout? Is this problem always permanent or is it possible there is a way to "increase the timeout" to avoid this issue?
2) Even though this message is presented to us at the stream level, it seems to affect all streams simultaneously running on the machine— is there a reason to do this as a stream event rather than a (recoverable) Session event?
3) Are there any best practices about knowing whether a Stream event is recoverable or requires ditching the old stream and requesting the stream again?
Thanks very much,
David