Skip to content

Apply Configured MySQL Connection Pool Settings - #39

Merged
x64-dev merged 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
STK0Cervanthes:fix/db-connection-pool-size-not-applied
Aug 15, 2026
Merged

Apply Configured MySQL Connection Pool Settings#39
x64-dev merged 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
STK0Cervanthes:fix/db-connection-pool-size-not-applied

Conversation

@STK0Cervanthes

@STK0Cervanthes STK0Cervanthes commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

oh what a Cerv in the PR's? someone stop this man. full disclosure this PR text are my ramblings turned into a coherent PR by john Co Pilot.

Summary

The database pool settings were read from configuration but never applied to the MySQL connection string.

As a result, production silently used MySql.Data defaults instead of the configured pool size. This could cap the application at approximately 100 connections despite db_max_poolsize being configured as 500.

Changes

  • Apply db_min_poolsize to MinimumPoolSize.
  • Apply db_max_poolsize to MaximumPoolSize.
  • Apply db_use_pooling to Pooling.
  • Apply db_conn_reset to ConnectionReset.
  • Add the pool settings to the sample appsettings.json. (this seems to be allready set in prod just not in the template i guess)
  • Preserve MySql.Data defaults when older deployments omit these settings.

Configuration

Production should include:

{
  "Database": {
    "db_min_poolsize": 10,
    "db_max_poolsize": 500,
    "db_use_pooling": true,
    "db_conn_reset": true
  }
}

dotnet build ran without issues and warnings.

This PR is technically related to a general issue in DB pooling and possible exhaustion but focuses on adressing only the con pool config issue.

C# aint my strong sword but this server magic is feel free to critisize and call me names if i fucked up.

@x64-dev
x64-dev merged commit 7cd2c79 into GeneralsOnlineDevelopmentTeam:main Aug 15, 2026
16 checks passed
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

Successfully merging this pull request may close these issues.

2 participants