此内容没有您所选择的语言版本。

18.5. Idle Connections


You can configure connections to be closed when they are idle. For example; if you just had a peak period and now want to reap the unused ones. This is done via the idle-timeout-minutes parameter.
Idle checking is done on a separate Idle Remover thread on an 'least recently used' (LRU) basis.
Idle connections (connections that have been unused for the period defined by idle-timeout-minutes) are purged regularly. The check is performed at an interval that is half of the idle-timeout-minutes value.
The pool itself operates on an 'most recently used' (MRU) basis. This allows the excess connections to be easily identified.
Should closing idle connections cause the pool to fall below the min-pool-size value, new connections are created.

Note

If you have long-running transactions and you use interleaving (i.e. do not track-connection-by-tx) make sure the idle timeout is greater than the transaction timeout. When interleaving the connection is returned to the pool for others to use. If however nobody does use it, it would be a candidate for removal before the transaction is committed.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat