Skip to content

Update Ballerina Persist Connection Pool Configuration Guidance #10096

@iamvirul

Description

@iamvirul

Current Limitation

The current Ballerina Persist documentation lacks specific guidance on how to configure database
connection pool sizes. This absence can lead users to manually attempt configuration in generated files
like persist_client.bal, which is not a recommended or sustainable practice as these changes can be
overwritten during code regeneration. Providing clear guidance is essential for users to effectively
manage their database connections and prevent potential issues like Hikari Connection Pool errors.

Suggested Improvement

The documentation for Ballerina Persist should be updated to introduce and clearly explain the recommended method for configuring database connection pool parameters using Config.toml. This approach ensures that connection settings are persistent and not affected by code
regeneration.

Specifically, the documentation should advise users to add the following configuration to their Config.toml file:

  [ballerina.sql]
  maxOpenConnections = 30
  maxConnectionLifeTime = 3000.0
  minIdleConnections = 10

Additionally, the documentation should explain the purpose of each of these configuration parameters (maxOpenConnections,maxConnectionLifeTime, minIdleConnections) to help users understand and effectively tune their connection pools. This change will
provide a more robust and maintainable solution for users integrating Ballerina Persist with their projects.

Version

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions