org.glassfish.jersey.servletServletContainer.service() hanging for too long
up vote
0
down vote
favorite
I was analysing some slow API requests with Dynatrace. I saw this one that took 623 ms and it caught my attention. I was able to see the PurePath of the request and the first thing that happens is org.glassfish.jersey.servletServletContainer.service()
spend 590 ms before calling the next method, as can be seen below:
The scenario of the test is like this:
Apache JMeter with 1 thread performing the same request everytime. On the first 100 seconds or so, the average response times is around 5 ms and then suddenly the response time increases and stay high until the end of the test. After the increase in response time, all the requests look like the on in the image. There is a huge hang time (apparently from Jersey).
I'm using the following Jersey/Jersey REST versions:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>2.22.2</version>
</dependency>
Is it a documented problem? Have anyone experienced that?
Edit 1:
I was able to reproduce this with Postman.
JMeter is sending Connection: close
on the request header. JMeter's Connect time is low and the response time is higher than normal. It doesn't seem to be a problem of opening a new connection on every request.
java jersey jetty jersey-2.0 dynatrace
add a comment |
up vote
0
down vote
favorite
I was analysing some slow API requests with Dynatrace. I saw this one that took 623 ms and it caught my attention. I was able to see the PurePath of the request and the first thing that happens is org.glassfish.jersey.servletServletContainer.service()
spend 590 ms before calling the next method, as can be seen below:
The scenario of the test is like this:
Apache JMeter with 1 thread performing the same request everytime. On the first 100 seconds or so, the average response times is around 5 ms and then suddenly the response time increases and stay high until the end of the test. After the increase in response time, all the requests look like the on in the image. There is a huge hang time (apparently from Jersey).
I'm using the following Jersey/Jersey REST versions:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>2.22.2</version>
</dependency>
Is it a documented problem? Have anyone experienced that?
Edit 1:
I was able to reproduce this with Postman.
JMeter is sending Connection: close
on the request header. JMeter's Connect time is low and the response time is higher than normal. It doesn't seem to be a problem of opening a new connection on every request.
java jersey jetty jersey-2.0 dynatrace
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I was analysing some slow API requests with Dynatrace. I saw this one that took 623 ms and it caught my attention. I was able to see the PurePath of the request and the first thing that happens is org.glassfish.jersey.servletServletContainer.service()
spend 590 ms before calling the next method, as can be seen below:
The scenario of the test is like this:
Apache JMeter with 1 thread performing the same request everytime. On the first 100 seconds or so, the average response times is around 5 ms and then suddenly the response time increases and stay high until the end of the test. After the increase in response time, all the requests look like the on in the image. There is a huge hang time (apparently from Jersey).
I'm using the following Jersey/Jersey REST versions:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>2.22.2</version>
</dependency>
Is it a documented problem? Have anyone experienced that?
Edit 1:
I was able to reproduce this with Postman.
JMeter is sending Connection: close
on the request header. JMeter's Connect time is low and the response time is higher than normal. It doesn't seem to be a problem of opening a new connection on every request.
java jersey jetty jersey-2.0 dynatrace
I was analysing some slow API requests with Dynatrace. I saw this one that took 623 ms and it caught my attention. I was able to see the PurePath of the request and the first thing that happens is org.glassfish.jersey.servletServletContainer.service()
spend 590 ms before calling the next method, as can be seen below:
The scenario of the test is like this:
Apache JMeter with 1 thread performing the same request everytime. On the first 100 seconds or so, the average response times is around 5 ms and then suddenly the response time increases and stay high until the end of the test. After the increase in response time, all the requests look like the on in the image. There is a huge hang time (apparently from Jersey).
I'm using the following Jersey/Jersey REST versions:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>9.2.3.v20140905</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.22.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>2.22.2</version>
</dependency>
Is it a documented problem? Have anyone experienced that?
Edit 1:
I was able to reproduce this with Postman.
JMeter is sending Connection: close
on the request header. JMeter's Connect time is low and the response time is higher than normal. It doesn't seem to be a problem of opening a new connection on every request.
java jersey jetty jersey-2.0 dynatrace
java jersey jetty jersey-2.0 dynatrace
edited Nov 21 at 19:17
asked Nov 21 at 18:20
luizfzs
65011028
65011028
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25
add a comment |
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53418314%2forg-glassfish-jersey-servletservletcontainer-service-hanging-for-too-long%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
As with all things jmeter related, are you opening new HTTP/1.1 persistent connections for each request? (a super common mistake). Are you sending data? (POST/PUT/etc) if so, are you reading all of that data on the server side? What does the Jetty Server Dump tell you?
– Joakim Erdfelt
Nov 21 at 19:10
@JoakimErdfelt added info. I'm not able to see Jetty Server log at the moment. I'll add info if I can access it.
– luizfzs
Nov 21 at 19:25