Skip to content

Commit 5c0613b

Browse files
committed
max connection lifetime of 5 minutes, make sure we cycle the connections
1 parent 7d58789 commit 5c0613b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/arpnetworking/tsdcore/sinks/HttpPostSink.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ protected HttpPostSink(final Builder<?, ?> builder) {
195195

196196
static {
197197
final DefaultAsyncHttpClientConfig.Builder clientConfigBuilder = new DefaultAsyncHttpClientConfig.Builder();
198-
clientConfigBuilder.setThreadPoolName("HttpPostSinkWorker");
198+
clientConfigBuilder.setThreadPoolName("HttpPostSinkWorker")
199+
.setConnectionTtl(300000);
199200
final AsyncHttpClientConfig clientConfig = clientConfigBuilder.build();
200201
CLIENT = new DefaultAsyncHttpClient(clientConfig);
201202
}

0 commit comments

Comments
 (0)