Python Ticker

girish400
Python kite ticker connection was closed and reconnected several times today.

When the reconnection happens, do we receive the lost ticks (when disconnected) once the ticker is reconnected?

Do you have any root cause and solution to have an uninterrupted ticker?

Thanks,
  • ytomar
    Same question as above. There are a lot of disconnections which are happening for the last 5 days
  • rakeshr
    @girish400
    No, you will not receive disconnection lost ticks.We are checking same at our end, but haven't encountered any disconnection.Can you paste here, complete error traceback?
  • girish400
    Today it was disconnected only once and reconnected later. But frequent disconnection is a problem.

    2018-07-09 09:57:07,657 - kiteconnect.ticker - ERROR - Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    2018-07-09 09:57:07,659 - root - ERROR - closed connection on error: 1006 connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    2018-07-09 09:57:07,660 - kiteconnect.ticker - ERROR - Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    2018-07-09 09:57:07,662 - root - ERROR - closed connection on close: 1006 connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    2018-07-09 09:57:11,628 - root - DEBUG - on connect: {"peer": "tcp4:52.66.68.152:443", "headers": {"date": "Mon, 09 Jul 2018 04:27:11 GMT", "connection": "upgrade", "upgrade": "websocket", "sec-websocket-accept": "U4ezt9yOTIggTeqAe2uF28e0bA4="}, "version": 18, "protocol": null, "extensions": []}
  • rakeshr
    @girish400
    Can you log complete traceback, instead of just exception?
  • ytomar
    ytomar edited July 2018
    Is it still happening? I am facing the same issue. The ticker disconnects and connects after 10 seconds and I loose most of the ticks.
  • neerleo88
    Is there any update on this ? Its still happening

  • rakeshr
    @neerleo88
    Please log tick disconnection error and paste complete traceback here, so we can check?
  • neerleo88
    Why Connection error: 1006 is occurring in every 5-10 minutes. Also its takes at least 20-30 sec to reconnect and some time it is taking more than 1-2 minutes. I am unable to get correct data for 5,10 min candles. Please find below errors at different times in a matter of just 1.5 hours.
    Please note : I am fetching data foe Nifty Bank Index (260105)

    0 2019-01-14 09:34:45 27253.6
    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
    ERROR:root:closed connection on error: 1006 connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
    0 2019-01-14 09:35:03 27251.95


    Below it took more than 1 min
    0 2019-01-14 09:38:03 27265.35
    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
    ERROR:root:closed connection on error: 1006 connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Retrying connection. Retry attempt count: 1. Next retry in around: 3 seconds
    ERROR:kiteconnect.ticker:Retrying connection. Retry attempt count: 2. Next retry in around: 10 seconds
    0 2019-01-14 09:39:15 27264.55


    0 2019-01-14 10:00:29 27231.05
    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
    ERROR:root:closed connection on error: 1006 connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
    0 2019-01-14 10:00:36 27228.7

    0 2019-01-14 10:12:54 27231.85
    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
    ERROR:root:closed connection on error: 1006 connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Retrying connection. Retry attempt count: 1. Next retry in around: 3 seconds
    0 2019-01-14 10:13:23 27224.65

    0 2019-01-14 10:26:03 27231.6
    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (None)
    ERROR:root:closed connection on error: 1006 connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (None)
    ERROR:kiteconnect.ticker:Retrying connection. Retry attempt count: 1. Next retry in around: 2 seconds
    0 2019-01-14 10:26:33 27233.7
  • neerleo88
    @rakeshr can you please check my above comment and provide solution
  • neerleo88
    @rakeshr Is there any update on this issue ??
  • rakeshr
    @neerleo88
    Can you remove ws.close() and then check?
    If still facing issue ,paste your Websocket code here.
Sign In or Register to comment.