OkHttp how to set maximum connection pool size (not max idle connections) -
in okhttp cannot find way set hard maximum connection pool size. documentation https://square.github.io/okhttp/3.x/okhttp/okhttp3/connectionpool.html clear can set maximum idle connections, not overall max. means high load can grow beyond limit.
is there way maximize pool? if not, why not?
connections either active , held particular in-flight call, or idle , in pool. limit total number of connections limiting number of threads executing http calls. if you’re using call.execute()
(synchronous) size thread pool appropriately. if you’re using call.enqueue()
(asynchronous) limits in dispatcher
.
Comments
Post a Comment