Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Standard Feature Blog post -Configuring Quiesce Timeout in Open Liberty 23.0.0.12 #3419

Open
jimblye opened this issue Oct 26, 2023 · 1 comment

Comments

@jimblye
Copy link
Member

jimblye commented Oct 26, 2023

Title: Configuring Quiesce Timeout in Open Liberty 23.0.0.12

There is a new capability in Open Liberty 23.0.0.12 that allows users to configure the server's quiesce timeout. This feature enables developers and administrators to manage server shutdowns more effectively, ensuring that applications have sufficient time to gracefully complete their operations.

Understanding Quiesce Timeout

The quiesce timeout is a period of time during server shutdown when the server stops accepting inbound requests and waits for existing threads to complete processing of existing requests. Until now, the quiesce timeout was hard-coded to 30 seconds. The minimum timeout value you can set is 30 seconds. If you set a value less than 30 seconds, the value 30 seconds will be used instead.

How to Configure Quiesce Timeout

To customize the quiesce timeout, add the quiesceTimeout attribute to the <applicationManager> element in the server.xml configuration file. For example, <applicationManager quiesceTimeout="1m30s"/> sets the quiesce timeout to 1 minute and 30 seconds.

Other Configurable Timeouts

Open Liberty has two other configurable timeouts related to server shutdown:

  1. Chain Quiesce Timeout: This timeout is configurable on the <channelfw> element of server.xml and governs how long channel chains, or endpoints, are allowed to complete existing request/response exchanges before being forced to close. A channel chain is a collection of associated channels (such as TCP, SSL, and HTTP channels) that make up an endpoint. By default, the timeout is set to 30 seconds.

  2. Server Stop Command Timeout: When issuing the server stop command, the server script sends the stop command to the server and waits for the server to complete shutdown. The server script can be thought of as a client, and it simply waits for the server to shut down. If the command times out, it could mean that the server is hung or that the server needs more time to shut down. When this occurs, the client simply terminates with an error code, but the server process continues. In this case, the server might need to be terminated manually. By default, the client waits up to 30 seconds. Users can configure this timeout using the --timeout option on the server stop command, aligning it with the application's specific shutdown requirements.

Managing Timeout Relationships

It's important to understand the relationships between these timeout values:

  • The application manager quiesce timeout takes precedence over the chain quiesce timeout. When the application manager quiesce timeout expires, the server terminates, regardless of the state of existing requests or the time left on the chain quiesce timeout. Therefore, it is recommended to set the chain quiesce timeout to a value less than or equal to the application manager quiesce timeout.

  • Align the server stop command timeout with the application manager quiesce timeout to ensure a graceful server shutdown. The timeout value for the server stop command should be determined by the length of time it normally takes for the Liberty server to shut down in your environment. Simply add an acceptable "grace period" to that time and set that as your timeout value.

Using the --force Option

To immediately shut down the server, Open Liberty provides the --force option on the server stop command, allowing the server to skip the quiesce stage and shut down immediately. However, be aware that a forced server shutdown does not allow time for requests already in progress to finish processing.

Conclusion

The ability to configure the quiesce timeout provides users with enhanced control over server shutdown behavior, enabling them to tailor timeouts to specific application requirements. 


@jimblye jimblye changed the title GA BLOG -Configuring Quiesce Timeout in Open Liberty 23.0.0.12 Standard Feature Blog post -Configuring Quiesce Timeout in Open Liberty 23.0.0.12 Oct 26, 2023
@GraceJansen
Copy link
Member

Hi @jimblye is this still a blog you'd like to write? Sounds like a great topic and it looks as if you already have a lot of the content planned out, so it would be great to have if you're still interested in writing it

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

No branches or pull requests

2 participants