The program I have written just receives the tick and logs some data points from the ticks in a file. The program ran well for 2.5 hours, then I got this error suddenly. I did not get a full stack trace, just these 2 lines.
Connection error: 1006 - connection was closed uncleanly (None) Connection closed: 1006 - connection was closed uncleanly (None)
The thread in the FAQ says i should not implement any logic inside the on_ticks, but should pass the ticks onto some other thread. At the moment I am not applying any logic, but only logging the ticks coming in, like it is shown in the kiteticker example code in the documentation.
You can try moving logging also if you are subscribing to multiple instruments. Check your firewall settings which may be closing a long standing connections and sometimes it could be ISP also, you may try alternate network as well.
Should I do that logging also in another thread?