Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Jersey/Jetty API Handler/Container resends the GET request every 1 min(Jersey/Jetty API Handler/Container resends the GET request every 1 min if it does not receive the response within 1 minute)
Jersey/Jetty API Handler/Container resends the GET request every 1 min [message #1843128] Fri, 16 July 2021 10:39 Go to next message
Deepika Malik is currently offline Deepika MalikFriend
Messages: 3
Registered: July 2021
Junior Member
<jersey.version>2.23.2</jersey.version>
<jetty.version>9.4.11.v20180605</jetty.version>

There is a GET API resource registered with Jersey and I am hitting this API from Postman. In case, the num of records is less and can be fetched within 1 minute, API works fine. But, if the request takes more than 1 minute to process, the Jetty Container closes the previous request Socket and sends a new GET request to same API (no external requests are sent, Jetty is sending them itself).
In this way, there is a new API request every 1 min (for 6 mins which is Gateway Timeout) and there are 6 API requests running simultaneously. But, all of them fails with exception
An I/O error has occurred while writing a response message entity to the container output stream.
because the Socket Connections for all the API requests are already closed after 1 min.
I suspect that it has to do something with the IdleTimeout or ConnectionTimeout on Jersey or Jetty side. But, I am unable to find the exact root cause for it. I tried to search on this topic all over the internet but could not find an answer to the behaviour I am seeing on local.
I also suspect that this might be because of lack of SSL session on local. But, wanted an insight from you on how was this functionality of Jersey, Jetty and SSL designed and implemented.

FYI : There is no SSL Session being used on local. Only Production environment has SSL certificates and sessions. These are non-Async requests.

Q 1. Any idea why Jetty does that ?

Also, I tried to change the timeouts in ServerFactory like so, but nothing changed the above behaviour :
((DefaultServerFactory)startupConfig.getServerFactory()).setIdleThreadTimeout(Duration.minutes(4));
startupConfig.getMetricsFactory().setFrequency(Duration.minutes(4));


Q 2. Any idea what settings need to be changed ?

On Production, SSL Sessions are being used and I don't see this problem there.

Q 3. How would SSL Session change this behaviour of resending the new API requests bu Jetty ?
Re: Jersey/Jetty API Handler/Container resends the GET request every 1 min [message #1843186 is a reply to message #1843128] Mon, 19 July 2021 14:05 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Hi Deepika

I don't think your question is related to Eclipse Scout (see our forum rules). I guess you should post your question in a forum related to Jetty or Jersey.

Cheers
André


Eclipse Scout Homepage | Documentation | GitHub
Re: Jersey/Jetty API Handler/Container resends the GET request every 1 min [message #1843209 is a reply to message #1843186] Tue, 20 July 2021 09:05 Go to previous message
Deepika Malik is currently offline Deepika MalikFriend
Messages: 3
Registered: July 2021
Junior Member
Done Thanks !
Previous Topic:Viewing/rendering PDF file
Next Topic:JUnit - Scout
Goto Forum:
  


Current Time: Wed Feb 21 10:45:56 GMT 2024

Powered by FUDForum. Page generated in 0.02073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top