eclipse-ee4j / eclipse-ee4j/jersey

Thread delay in ApplicationHandler.handle() method

Open
#3,701 6 comments 0 reactions 0 assignees View on GitHub
ApplicationHandler performance
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

https://github.com/jersey/jersey/blob/5140ca13c57b4818600b79361c2f3347d934e8a7/core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java#L702

Issue was seen on Jersey 2.17, Some of the threads takes longer time to respond in this method, time delay caused by this is measured from newRelic tool and it was amounting to 11 Sec. But same request also completed with in 3 sec (complete request). We were unable to find the RC for this.

Issue happened in load testing scenario, but single user request and response time seems to be good, issue is in-consistent.

![image](https://user-images.githubusercontent.com/8543045/31663851-f1409310-b360-11e7-9ef7-3f94a7d5771b.png)

![image](https://user-images.githubusercontent.com/8543045/31663923-377659dc-b361-11e7-8278-27f80142a7af.png)

Contributor guide

Open the contributing guide

Research direction

Start with core-server/src/main/java/org/glassfish/jersey/server/ApplicationHandler.java at the linked line around 702, then investigate the inconsistent delay under load rather than single-user requests. Use the reported New Relic timings and load-testing scenario to compare slow and fast requests. Done means identifying the cause of the thread delay and documenting or correcting it with evidence from a reproducible test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.