Error websocket gets disconnected

nickmanan
@sujith @vivek I'm getting this error after it runs for few minutes and web socket gets disconnected . Is there any issue today ? That can I do to resolve the issue ?

dropping connection to peer tcp4:35.154.10.12:443 with abort=True: None
2018-02-28 11:32:00+0530 [-] will retry in 2 seconds
2018-02-28 11:32:00+0530 [-] Stopping factory
  • nickmanan
    nickmanan edited February 2018
    dropping connection to peer tcp4:35.154.10.12:443 with abort=True: None
    will retry in 2 seconds
    2018-02-28 11:32:00+0530 [-] Stopping factory
  • Vivek
    @nickmanan Can you post more logs? If websocket got disconnected for some other reason it would have been logged in previous log statements.
  • sujith
    We haven't got any complaints regarding Websockets API. Can you add more details about behavior and which Kite Connect library you are using?
  • sujith
    What version of API are you using?
  • nickmanan
    @sujith @vivek I've just moved the code to google cloud and facing the issue there ... I've updated the kite connect using
    Pip install kiteconnect --upgrade --pre

    Below is there error that gets stored in log

    2018-02-28 12:40: log: WARNING: closed connection on error: 1006 connection was closed uncleanly (None)
    2018-02-28 12:40: log: WARNING: closed connection on close: 1006 connection was closed uncleanly (None)
  • nickmanan
    twisted.internet.tcp.Connector object at 0x000002885D4B5390> will retry in 2 seconds
  • nickmanan
    @sujith @vivek please help !!
    KiteTickerClientProtocol (TLSMemoryBIOProtocol),client] will retry in 2 seconds
    2018-03-01 09:49:06+0530 [-] Stopping factory
    2018-03-01 09:49:09+0530 [-] Starting factory
  • nickmanan
    @sujith @vivek is there a way I can restart websocket connection on error ?
  • zartimus
    @nickmanan Please give us more logs. Enable debug flag on kiteticker instance and run again.
  • nickmanan
    @zartimus when there's any error , we can predefine some actions , right ? I'm thinking to restart the websocket in that function .. how can I do that ?
  • sujith
    @nickmanan,
    You don't need to do anything, pykiteconnect has a reconnection logic written already and it is enabled by default.
    You can check out here.
  • sujith
    If you have enabled reconnect and if there is some interruption then pykiteconnect will do reconnection for you.
  • nickmanan
    @sujith But it does not reconnect , it tries to and it does not
  • nickmanan
    What if I resubscribe ?
  • sujith
    @nickmanan,
    You need to be connected then only you can subscribe to tokens.
Sign In or Register to comment.