Connections
See below for more topics on connection pool management and clearing connection pools.
- See Also
-
- Creating connections, connecting from components, and using connection pools in the Flow Service: See Designing Flows > Flow Elements > Connections.
- Connecting to data sources: See the Connection Definitions section for data-source-specific properties.
Automatically Clearing Connection Pools
The Flow Service automatically maintains each data source's connection pools. The Flow Service clears the individual connection pools for each data source connection in the following cases:
- When the reuse count has been reached.
- When a connection hasn't been used within the time-out.
- When the flow using the connection terminates abnormally.
The Flow Service clears all connection pools in the following cases:
- When the Flow Service stops.
- When any connection definition from any data source changes.
- When the flow terminates abnormally and an error occurs when the connection is released. For example, if the flow terminates with an error and an error also occurs during rollback.
Configuring Connection Pool Maintenance
To configure connection pool maintenance, set the following on the Settings > Services > Flow Engine page of the management console:
- Connection Pool Size: Specify the maximum number of connections in the pool.
- Connection Reuse Count: Discard a connection from the pool after the connection reaches the reuse count.
- Connection Pool Timeout: Discard a connection from the pool if it hasn't been used within the time-out. The default is 7200 seconds (2 hours).
Clearing Connection Pools Automatically on an Error
A flow terminates abnormally, triggering the connection pools to clear, when a component throws an error and you haven't configured an error-processing flow in the Exception property for a component and you haven't configured a general error-processing flow in the General Exception property for a flow.
See The Processing Steps in a Flow > Error Processing under "More Topics" to configure error-handling for a component.
Manually Clearing Connection Pools
You need to clear a connection pool when the physical connection that the connection pool uses becomes unavailable. For example, if you restart the database server, then the flow components will throw an error when they execute operations to the database. To avoid this error, you need to manually clear the connection pool.
You can manually clear all connection pools on the Tools > Services page of the management console; click the button to clear database connection pools. Or, use the flow-ctrl tool's clear connection-pool command.