Issue with Websockets API

swas99
I am facing issues with websocket: They are being disconnected very frequently irrespective of the number of scrips (tried 30/3000, distributed across 3 WebSockets) being subscribed.
Same code was working fine till now.

Is anyone else facing the same issue?
@Zerodha-Folks: Can you check?
Tagged:
  • swas99
    Error:
    ```
    com.neovisionaries.ws.client.OpeningHandshakeException: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 502 Bad Gateway
    at com.neovisionaries.ws.client.HandshakeReader.validateStatusLine(HandshakeReader.java:232)
    at com.neovisionaries.ws.client.HandshakeReader.readHandshake(HandshakeReader.java:54)
    at com.neovisionaries.ws.client.WebSocket.readHandshake(WebSocket.java:3244)
    at com.neovisionaries.ws.client.WebSocket.shakeHands(WebSocket.java:3123)
    at com.neovisionaries.ws.client.WebSocket.connect(WebSocket.java:2155)
    at com.zerodhatech.ticker.KiteTicker.connect(KiteTicker.java:214)
    at com.zerodhatech.ticker.KiteTicker.reconnect(KiteTicker.java:646)
    at com.zerodhatech.ticker.KiteTicker.doReconnect(KiteTicker.java:128)
    at auto_trade.ticker_websocket.TickerWS.lambda$initListeners$1(TickerWS.java:86)
    at com.zerodhatech.ticker.KiteTicker$3.onDisconnected(KiteTicker.java:305)
    at com.neovisionaries.ws.client.ListenerManager.callOnDisconnected(ListenerManager.java:223)
    at com.neovisionaries.ws.client.WebSocket.finish(WebSocket.java:3558)
    at com.neovisionaries.ws.client.WebSocket.onThreadsFinished(WebSocket.java:3528)
    at com.neovisionaries.ws.client.WebSocket.onWritingThreadFinished(WebSocket.java:3517)
    at com.neovisionaries.ws.client.WritingThread.notifyFinished(WritingThread.java:539)
    at com.neovisionaries.ws.client.WritingThread.runMain(WritingThread.java:78)
    at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
    [WS_2]: Error: The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 502 Bad Gateway
    ```
  • sujith
    It seems fine from our end. Can you try it on any other network?
  • sbdavra
    @sujith
    i also raised same complain today , on same time i was disconnected so many times from zerodha , but still not got proper answer

  • rajtk
    same here , it keeps logging off since yesterday. It was working perfectly until last friday

    ERROR:kiteconnect.ticker:Connection error: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    ERROR:kiteconnect.ticker:Connection closed: 1006 - connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    1006
    connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)

  • sujith
    We have informed the concerned team to look into this. We will update here once we hear back from them.
  • ansubur
    I'm also facing the same problem. Please confirm whether problem is common for all. I've been scratching my head trying to troubleshoot this strange issue.
  • swas99
    Is this fixed for good now?
  • rakeshr
    Yes, you can refer to this thread to know more.
This discussion has been closed.