Updated on 2025-05-29 GMT+08:00

Connection Pool Parameters

When a connection pool is used to access the database, database connections are established and then stored in the memory as objects during system running. When you need to access the database, no new connection is established. Instead, an existing idle connection is selected from the connection pool. After you finish accessing the database, the database does not disable the connection but puts it back into the connection pool. The connection can be used for the next access request.

cache_connection

Parameter description: Specifies whether to recycle the connections of a connection pool.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The connections of a connection pool will be recycled.
  • off: The connections of a connection pool will not be recycled.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 2.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If this parameter is disabled, the connections held by the session are cleared after the session execution statement ends. As a result, the service frequently establishes connections, affecting the performance.

This parameter does not take effect in centralized mode.