You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HI
I have an application that uses the LogsQueryClient to query for certain monitoring logs.
On start of the application I do create a LogsQueryClient which is supposed to stay alive until the application shuts down.
Every minute, I query for logs. And I do get a lot of ConnectionClosed exceptions. Talking about every or every 2nd time.
This is how I produce the client:
@Produces
LogsQueryClient logsQueryClient() {
ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder()
.tenantId(logQueryConfigMap.tenantId())
.clientId(logQueryConfigMap.clientId())
.clientSecret(logQueryConfigMap.clientSecret())
.build();
var clientOptions = new HttpClientOptions().setConnectionIdleTimeout(Duration.ofMinutes(5));
return new LogsQueryClientBuilder()
.credential(clientSecretCredential)
.clientOptions(clientOptions)
.buildClient();
}
Is keeping the client alive the intended use? What else can be wrong so my connection keeps getting closed?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
HI
I have an application that uses the
LogsQueryClient
to query for certain monitoring logs.On start of the application I do create a
LogsQueryClient
which is supposed to stay alive until the application shuts down.Every minute, I query for logs. And I do get a lot of ConnectionClosed exceptions. Talking about every or every 2nd time.
This is how I produce the client:
Is keeping the client alive the intended use? What else can be wrong so my connection keeps getting closed?
Beta Was this translation helpful? Give feedback.
All reactions