We are currently facing very weird problem in our enterprise application.
We are using - Jersey 1.17 - JDK 1.8 (which we have recently migrated)
In our application what we do is, we make REST http calls to get the data from our different application server. Everything is normal in terms of speed/performance unless the load is increased.
When we excute the method (CallXService in below trace) which internally makes 10 to 15 Rest calls to different application the two reading are captured like
- 7 seconds - when there is almost no load.
- 28 seconds - when there is more load.
When we deep dive into the calls of 28 seconds call we get following trace along with the time captured.
JerseyRestClient.CallXService:469(0 ms self time, 6143 ms total time)
WebResource.post:251(0 ms self time, 6143 ms total time)
WebResource.handle:680(0 ms self time, 6143 ms total time)
Client.handle:648(0 ms self time, 6143 ms total time)
URLConnectionClientHandler.handle:149(0 ms self time, 6143 ms total time)
URLConnectionClientHandler._invoke:249(10 ms self time, 6143 ms total time)
URLConnectionClientHandler.getInputStream:310(6091 ms self time, 6091 ms total time)
Note the time taken by getInputStream here.
Where as in first 7 seconds getInputStream is not taking much time.
What does that time tells 1) Slow responding server 2) Network speed while getting the resource 3) Or the problem of Java 8 and Jersey 1.17.
Any help is much appreciated. Thanks !