Skip to content

Push queries abort after 10 minutes of no activitiy #101

Answered by mrt181
mrt181 asked this question in Q&A
Discussion options

You must be logged in to vote

So what we did is to configure the sockets handler to send keep alive pings.

  builder
    .Services.AddHttpClient<
      ksqlDB.RestApi.Client.KSql.RestApi.Http.IHttpClientFactory,
      ksqlDB.RestApi.Client.KSql.RestApi.Http.HttpClientFactory
    >()
    .UseSocketsHttpHandler(
      (handler, _) =>
      {
        handler.PooledConnectionLifetime = TimeSpan.FromHours(1);
        handler.KeepAlivePingPolicy = HttpKeepAlivePingPolicy.Always;
        handler.KeepAlivePingDelay = TimeSpan.FromMinutes(1);
        handler.KeepAlivePingTimeout = TimeSpan.FromMinutes(1);
      }
    )
    .SetHandlerLifetime(Timeout.InfiniteTimeSpan);

This is a good solution but did not work for me because th…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mrt181
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants