Skip to content

Shutdown is slow #1916

Open
Open
@halaei

Description

@halaei

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions