Socket connection dropping very frequently

rupanshu
I have been getting this error repeatedly for the past two days:

Ticker Connection Error Occurred: 1006: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)

also, the Zerodha trading portal is getting logged out.
the ticker connection is in a different environment/server, the Zerodha portal is being logged onto the local and I have switched to 6 different environments with different internet connections to check if the problem is from my side.
turns out everything else works fine.

My ticks are having discrepancies due to frequent logouts and orders do not even get placed.
  • sujith
    @rupanshu,
    You might be blocking the main thread that is receiving ticks. You can check out the FAQs to know more about it.
  • rupanshu
    i have provision to launch a separate process that receives the ticks, other than the main thread in a django app server.

    hence, i am not blocking the process in any sense that receives the ticks.
  • rakeshr
    1006: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)
    Can you paste here/DM your websocket code? As, per the error message, it looks like websocket dropped, due to blocking on the thread.
    the Zerodha trading portal is getting logged out
    Are you using the same client ID at both platforms?
    This thread explains in detail regarding simultaneous sessions.
Sign In or Register to comment.