requests timing out, (at less than 2 requests per second on historical api)

yousuf
yousuf edited December 2018 in Java client
from an hour or so, requests are timing out (mcx data ), even at the rate of 2 requests in 3 seconds...

  • sujith
    Is this still happening?
  • rajtk
    Hi Sujith, I had posted a ticket yesterday night ( still appearing in my draft section) with same issue. Historical data requests timing out.
  • rakeshr
    @yousuf @rajtk
    Are you getting Request failed exception, as below ?
    kiteconnect.exceptions.NetworkException: Request failed (kitetrade-common).
  • yousuf
    yousuf edited December 2018
    hi @rakeshr @rajtk
    Yes, its a NetworkException
    below is part of the stack trace.
    delay between requests is 400 milliseconds introduced, plus there is processing delay of more than a 100 milliseconds. so its not more than 2 requests per second.
    ---------------------------------------------------------------------------------------------------------------------------
    .......com.zerodhatech.kiteconnect.kitehttp.exceptions.NetworkException
    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:69)
    at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(KiteConnect.java:604)
    -----------------------------------------------------------------------------------------------------------------------------


  • yousuf
    Please note, @rakeshr , the exception is sometimes this too, though not as frequent as the above one,
    I am on a pretty reliable and fast internet connection, 50mbps



    java.net.SocketTimeoutException: timeout
    at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.java:593)
    at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.java:601)
    at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:146)
    at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:125)
    at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
    at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
    at okhttp3.RealCall.execute(RealCall.java:77)
    at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:67)
    at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(KiteConnect.java:604)
  • yousuf
    yousuf edited December 2018
    More Observations :: The historical API calls are sometimes running quite well for a few minutes, then slowly the exceptions start, one every minute and steadily increase to a rate where i guess one request in more than 5 gets through. Restarting / reconnecting, changing internet connection to an other one, has no effect at all.

    From yesterday its become bad.
  • rakeshr
    @yousuf
    We are looking at it. For time being, can you handle above NetworkException at your end?
  • yousuf
    I appreciate. thank you.!
    hope it will be resolved soon.!
  • yousuf
    hi @rakeshr
    seems like this is resolved.
This discussion has been closed.