B4J Question [Solved]httpclient : increase concurrent request limits

billzhan

Active Member
Licensed User
Hi,

How can I increase concurrent request limits of HttpClient (HttpUtils2)? Current limit is about 5.

I have asked the similar thing for OkHttp. OkHttp(with default concurrent limits ,and one request after another ) seems not to response after large number of requests been made.

Thanks
 
Last edited:

billzhan

Active Member
Licensed User
I've only test one request after another. Win7 64bit. Server is another B4J server(4.20 ,released mode, localhost) return text "ok"

OkHttp:
Debug mode: stop to response after 100-300 requests. Jobdone event not fire ( even after timeout)
Release mode : 50% chance to stop at about 2000 or 3000 requests (Stop testing after 5000 req)

HttpClient works fine after 10000 reqs.

Maybe it's caused by my computer. I've tested in Vmware Ubuntu 14.04, similar result with OkHttp

Code attached
 

Attachments

  • OkHttpUtils2_request.zip
    4 KB · Views: 148
  • OkHttpUtils2_sever.zip
    1.2 KB · Views: 169
Upvote 0

billzhan

Active Member
Licensed User
Updated the core library. Simple tests with Win7 64bit & Ubuntu 14.04 32bit.

Single thread/multiple threads requests work well now, jobdone events are called when time_out.

So the issue with OkHttp seems fixed.

Thanks
 
Upvote 0
Top