users@jersey.java.net

[Jersey] Re: Jersey client concurrency question

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Tue, 11 Feb 2014 23:44:46 -0500

Hi Jeff,

I'm not aware of any such tools. Perhaps someone else on the mailing
list is...?

Gili

On 11/02/2014 11:34 PM, Jeff wrote:
> It is "external", meaning I just use the straight JerseyClient to hit
> our service running in our dev environment deployed by our CI/CD servers.
>
> The test code/project is separate from the source of the web service
> project as it will be used to test multiple applications as they are
> promoted through the CI/CD pipeline. I assumed at first glance (a day
> or so ago), that JerseyTest was for unit testing Jersey applications.
> Is that a fair assessment? Regardless, I'll have to look at it more
> closely.
>
> Related to my original post, I finally got the java profiler running
> and found the tests were blocking on the SocketRead0() call after each
> POST and have since whittled things down and discovered a problem in
> one of the back-end databases used by our service.
>
> Still, if there are slick ways to diagnose issues with the
> JerseyClient calls that could help with the forensics, I'm all ears! :)
>
> On Tue, Feb 11, 2014 at 4:21 PM, cowwoc <cowwoc_at_bbs.darktech.org
> <mailto:cowwoc_at_bbs.darktech.org>> wrote:
>
> Are you using JerseyTest at all? Or an external test server?
>
> Gili
>
>
> On 11/02/2014 6:05 PM, Jeff wrote:
>
> I'm fairly new to Jersey and am trying to create a simple test
> using the Jersey client (v2.5.1) to send concurrent requests
> to the server.
>
> I'm using TestNG to drive the test with a threadpoolsize of 30
> and an invocationcount of 1000. The test is a single test
> method that makes a RESTful POST request and sends a JSON file
> that is around 106,000 bytes.
>
> When I run it, it sends about 150 requests, then seems to
> stall out for 3 to 10 seconds, then it will send another batch
> and stall again.
>
> I've tried sharing a single JerseyClient instance across all
> threads as well as creating one JerseyClient instance per
> thread. I suspect server issues handling the requests, but I
> can't see any errors on the server side and memory/cpu
> utilization on the server is minimal.
>
> Are there any concurrency considerations/settings I should
> look at on the client side?
>
> Is there a way to narrow down where it might be getting hung up?
>
> Thanks in advance!
>
> --
> Jeff Vincent
> See my LinkedIn profile at:
> http://www.linkedin.com/in/rjeffreyvincent
>
>
>
>
>
> --
> Jeff Vincent
> See my LinkedIn profile at:
> http://www.linkedin.com/in/rjeffreyvincent