Skip to content

Commit

Permalink
Restored the idle connection evictor thread
Browse files Browse the repository at this point in the history
Setting `ClientProperties.CONNECT_TIMEOUT` and `ClientProperties.READ_TIMEOUT` to 1s
  • Loading branch information
namedgraph committed Dec 8, 2024
1 parent ed9a23d commit d1b0aa7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/atomgraph/linkeddatahub/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,8 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
config.register(new QueryProvider());
config.register(new UpdateRequestProvider());
config.property(ClientProperties.FOLLOW_REDIRECTS, true);
//config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
config.property(ClientProperties.READ_TIMEOUT, 1000);
config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity
config.property(ApacheClientProperties.CONNECTION_MANAGER, conman);
config.property(ApacheClientProperties.CONNECTION_CLOSING_STRATEGY, new ApacheConnectionClosingStrategy.GracefulClosingStrategy());
Expand Down Expand Up @@ -1509,6 +1510,8 @@ public void releaseConnection(final HttpClientConnection managedConn, final Obje
config.register(new QueryProvider());
config.register(new UpdateRequestProvider()); // TO-DO: UpdateRequestProvider
config.property(ClientProperties.FOLLOW_REDIRECTS, true);
config.property(ClientProperties.CONNECT_TIMEOUT, 1000);
config.property(ClientProperties.READ_TIMEOUT, 1000);
config.property(ClientProperties.REQUEST_ENTITY_PROCESSING, RequestEntityProcessing.BUFFERED); // https://stackoverflow.com/questions/42139436/jersey-client-throws-cannot-retry-request-with-a-non-repeatable-request-entity
config.property(ApacheClientProperties.CONNECTION_MANAGER, conman);
config.property(ApacheClientProperties.CONNECTION_CLOSING_STRATEGY, new ApacheConnectionClosingStrategy.GracefulClosingStrategy());
Expand Down

0 comments on commit d1b0aa7

Please sign in to comment.