Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Shutdown is slow #1916

Open
halaei opened this issue Nov 14, 2023 · 0 comments
Open

Shutdown is slow #1916

halaei opened this issue Nov 14, 2023 · 0 comments

Comments

@halaei
Copy link

halaei commented Nov 14, 2023

Shutdown process is slow, 3 seconds, even when the client is not used at all. I wonder what prevent immediate shutdown.

asyncHttpClient(
 config()
  .setConnectTimeout(5_000)
  .setRequestTimeout(20_000)
)

So I guess this is the shutdown logic:

// ChannelManager
  public void close() {
    if (allowReleaseEventLoopGroup) {
      eventLoopGroup
              .shutdownGracefully(config.getShutdownQuietPeriod(), config.getShutdownTimeout(), TimeUnit.MILLISECONDS)
              .addListener(future -> doClose());
    } else {
      doClose();
    }
  }

And I understand if I want to force faster shutdown I can pass a small value to setShutdownTimeout() builder function, but still I don't know why shutdown takes long when there was no interaction, even after close function was called.
Not sure if it is a bug or a good reason behind it.
Thanks :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant