Multiprocessing vs threading

rajtk
When I spin multiple threads to run my code, it work fine. But when I try to spin multiple processes to run the same code, it gives an error stating invalid token/ credentials. Has anyone faced this issue. can you suggest any workaround , or maybe a sample code to get started.
Tagged:
  • ZE4040
    @rajtk
    simple question for you, what are you attempting to do with the multiple processes?
  • Shaha
    Guess, you might be using same request token in all the processes. request token can be used only once.
  • sauravkedia
    @rajtk try and check if you are using the same access_token in all processes. Kite being HTTP based, it shouldnt really matter if you got your api key and access token right. So, ideally you should obtain your access_token once and use it all processes, rather that asking for a separate request_token (and then access_token) for all processes.
  • sauravkedia
    I myself run the websocket and the main tradingengine on two different processes.
Sign In or Register to comment.