Code getting stuck in REST API call

saurabhhuf
I have python code connects to a websocket and also make zerodha API calls to place orders etc. Every now and then the code gets stuck for many minutes and when I trigger any event on the terminal window (like maximize it or restore its size), then the code suddenly wakes up and starts executing further. It's the same code which runs every day and its the same loop which is run every minute. Most of the time it runs fine and gets stuck only on some days.
When its stuck, sometimes it says connection closed uncleanly and sometimes it doesn't.
What can I do about it?
  • rakeshr
    When its stuck, sometimes it says connection closed uncleanly and sometimes it doesn't.
    Check for your local network connection. Make sure, it doesn't suspend. Maybe this thread can help.
Sign In or Register to comment.