Skip to content

Commit

Permalink
Change Jersey client timeout values
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Nov 29, 2024
1 parent eb62fd1 commit 40c4f70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/atomgraph/linkeddatahub/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,9 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
};
if (maxConnPerRoute != null) conman.setDefaultMaxPerRoute(maxConnPerRoute);
if (maxTotalConn != null) conman.setMaxTotal(maxTotalConn);
conman.setValidateAfterInactivity(5000); // check connections idle for more than Varnish's idle_timeout which is 5s
conman.setValidateAfterInactivity(6000); // check connections idle for more than Varnish's idle_timeout which is 5s

Integer idleConnTimeout = 5000;
Integer idleConnTimeout = 4000;
// create monitor thread that evicts idle connections: https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/html/connmgmt.html#d5e418
ScheduledExecutorService idleConnectionMonitor = Executors.newSingleThreadScheduledExecutor();
idleConnectionMonitor.scheduleAtFixedRate(() ->
Expand Down Expand Up @@ -1479,9 +1479,9 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
};
if (maxConnPerRoute != null) conman.setDefaultMaxPerRoute(maxConnPerRoute);
if (maxTotalConn != null) conman.setMaxTotal(maxTotalConn);
conman.setValidateAfterInactivity(5000); // check connections idle for more than Varnish's idle_timeout which is 5s
conman.setValidateAfterInactivity(6000); // check connections idle for more than Varnish's idle_timeout which is 5s

Integer idleConnTimeout = 5000;
Integer idleConnTimeout = 4000;
// create monitor thread that evicts idle connections: https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/html/connmgmt.html#d5e418
ScheduledExecutorService idleConnectionMonitor = Executors.newSingleThreadScheduledExecutor();
idleConnectionMonitor.scheduleAtFixedRate(() ->
Expand Down

0 comments on commit 40c4f70

Please sign in to comment.