I use the Java SDK v3.3.2. I poll getMargins() every 10s to check if connection is alive. Multiple times during the day esp when there're large market moves, I see Kite calls fail with NetworkException. The app runs in the cloud, so actual network is not the issue for these many failures.
10:10:59 [scheduler-pool-3] c.o.t.b.KiteClientMgr - Err in kite login check com.zerodhatech.kiteconnect.kitehttp.exceptions.NetworkException: null at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.dealWithException(KiteResponseHandler.java:58) at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:20) at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:54) at com.zerodhatech.kiteconnect.KiteConnect.getMargins(KiteConnect.java:257)
Network exception is described as Represents a network issue between Kite and the backend Order Management System (OMS). Default code is 503.
Does this mean the OMS backend is not strong enough to handle surge loads? If yes, is the problem being worked on?
If I get this error when placing a trade, can it mean the order might have been placed and we need to wait for order events/poll orders before retrying?
Can this error ever mean we need to refresh the auth token? Should we re-trigger login flow when this happens?