Connection error: 1006 - connection was closed uncleanly (None)

rishiajmera
rishiajmera edited February 2021 in Python client
Hello,
I am using threading for collecting the tick data and not doing any functionality inside the on_ticks method but I am still getting the same connection error.
https://kite.trade/forum/discussion/7399/kiteconnect-ticker-connection-error-1006-connection-was-closed-uncleanly-none
I have already gone through the above link but it's still the same.
Can you please help me with the same?
Regards,
Rishi A.

  • sujith
    Did this happen today also? From how long you have been facing this issue?
  • rishiajmera
    rishiajmera edited February 2021
    @sujith Yes, it happened today also.
    It was working fine for a long time. Our system was stable for a long time and suddenly it started happening for the last 5-6 trading.
  • sujith
    Can you private message me the api_key? I will check and get back to you.
  • sujith
    Can you also elaborate on your setup and Kite Connect library details you are using?
  • rishiajmera
    rishiajmera edited February 2021
    @sujith
    I have tried the following combinations:
    kiteconnect==3.9.2
    Twisted==20.3.0
    __________
    kiteconnect=3.8.2
    Twisted==20.3.0

    But both the versions failed with the same error.
    I am sending you the API key in personal.
    Thanks
  • sujith
    We don't see any issue on the server and no logs for your app as well. Can you try on some alternate network?
  • rishiajmera
    I didn't get you. We've been running it every day so you must be seeing some logs I think. We're running it on AWS and I have tried with two different machines as well. but the result was the same.
  • sujith
    Can you run a script without dumping data and try tomorrow?
  • sujith
    Maybe just print the length of ticks array.
  • rishiajmera
    Okay @sujith I will try and let you know result
  • rishiajmera
    Hi, @sujith I have tried today without dumping data and just printing the length of the array. But it's still giving the same error.
  • rakeshr
    @rishiajmera
    We're running it on AWS and I have tried with two different machines as well
    We tried kiteconnect==3.9.2 version on same set-up as yours(AWS EC2 instance), and WebSocket streaming is absolutely working fine for us. So, we are unable to reproduce your above issue at our end, nor we found anything on logs for your connection.
    Are other API end-points working fine?
    Maybe paste your complete WebSocket code, we will take a look to debug.
  • rishiajmera
    @rakeshr I didn't understand this part: "nor we found anything on logs for your connection."
    Are you saying you're not finding anything related to the error or you're not getting any logs at all about connection? We're running it every day.

    I am sending you my code in a personal message.
  • sujith
    We meant we didn't find any error logs for your app.
  • rishiajmera
    okay, thanks @sujith. I have shared my code with @rakeshr Please check once and let me know if anything can be done.
  • rakeshr
    @rishiajmera
    Have replied to you. You can continue the further code-related conversations over DM.
  • rishiajmera
    I just checked it and understood the changes you suggested. Thank you very much for your wonderful support. I will try it tomorrow and will share my feedback. :)
Sign In or Register to comment.