Skip to content

fix(database): align database timeouts with service timeouts - #1858

Merged
rackerchris merged 2 commits into
rackerlabs:mainfrom
rackerchris:galera-service-tuning
Oct 30, 2026
Merged

rackerchris merged 2 commits into
rackerlabs:mainfrom
rackerchris:galera-service-tuning

Conversation

@rackerchris

@rackerchris rackerchris commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

fix(database): align MariaDB timeouts with service DB pool recycle

Services against the Galera MariaDB cluster logged repeated Aborted connection ... Got timeout reading communication packets warnings.

Root cause: the Galera overlay set wait_timeout=360 while every service pool recycled at connection_recycle_time=600. The server dropped idle pooled connections at 360s, before the pool recycled them at 600s.

Fix: make the pool recycle before the server drops the connection, at the largest interval that allows it:

Layer | Change | Before → After -- | -- | -- Galera MariaDB | wait_timeout / interactive_timeout | 360 → 3600 All 17 services | connection_recycle_time | 600 → 1800

The pool now recycles at 1800s, well under the 3600s server ceiling, so it closes idle connections gracefully and the server no longer aborts them.

Scope

  • base-kustomize/mariadb-cluster/galera/kustomization.yaml — Galera myCnf (replication base + Grafana cluster already at 3600, unchanged)
  • base-helm-configs/<svc>/<svc>-helm-overrides.yaml — connection_recycle_time: 1800 in all 17 services (nova ×3)
  • releasenotes/notes/mariadb-db-pool-timeout-alignment-release-2026.3.3.yaml

Notes

  • Invariant: service connection_recycle_time must stay lower than MariaDB wait_timeout for graceful pool-side cleanup; the 1800/3600 pairing is deliberate.
  • pool_timeout (60s) is the wait-for-free-conn timeout, not the idle timeout — unchanged.
  • Takes effect on next rollout of the mariadb-cluster pods and affected services.
  • Known pre-existing issue (not from this PR): reno lint fails on a UID collision in three ops-tools-check-octavia-ovn-* notes from PR feat: Add standardized ops-tools suite for release-2026.3.0 #1758 — documented in the release note.

@japerezjr

Copy link
Copy Markdown
Contributor
  • Did you mean to leave manilla unchanged or was it just missed?
  • I find the increase recycle times and timeouts a bit high, but that may be what is needed. I was thinking maybe leave the recycle times at 600 and just increase the timeouts to 1200, but again, that is just my two cents and I'll leave that up to you.
  • Do we need to update the net_read_timeout and net_write_timeout values as well?
  • Not related to your PR but I did notice genestack/base-kustomize/mariadb-cluster/galera/kustomization.yaml at b13af3867ab803268f56a9d7337a1f… has table_definition_cache set twice, do we just need to delete one?

@bjoernt

bjoernt commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Recycle timeout of 1800 is rather high we typically set it to 600, because if the connection isn't used within that time then it's likely not happening inside 1800 either.

@rackerchris
rackerchris force-pushed the galera-service-tuning branch from b13af38 to c18003c Compare October 29, 2026 15:39
@rackerchris
rackerchris requested a review from bjoernt October 29, 2026 15:40
@rackerchris

Copy link
Copy Markdown
Contributor Author

I reverted the change to connection recycle from 1800 back to 600. @bjoernt can i get another review?

@rackerchris
rackerchris merged commit 45e1b4e into rackerlabs:main Oct 30, 2026
4 checks passed
@rackerchris
rackerchris deleted the galera-service-tuning branch October 30, 2026 15:09
rackerchris added a commit that referenced this pull request Oct 30, 2026
rackerchris added a commit that referenced this pull request Nov 16, 2026
* Release 2026.3.2 (#1880)

* feat: Migrating observability to its own repo, retain observability i… (#1807)

* feat: Migrating observability to its own repo, retain observability installers

* chore: Cleaning update observability submodules and workflows

* fix: Adjusting monitoring doc for correct postgres link

* chore: Adding release notes for observability migration

* fix: Adjusting bootstrap to better handle symlink and lab scenario (#1867)

* fix: Updating observability bootstrap to cleanup leftover dirs (#1873)

* fix: Updating observability getting started docs for new bootstrap (#1878)

* fix: Updating missing observability gitignore entries (#1881) (#1882)

* Cherry picked Trove changes needed for LA: (#1884)

OSPC-2427 Trove: Image builds fail in production environment (#1840)
OSPC-2421 Trove: MySQL Backup image not built w/ the correct openstack version (#1857)
OSPC-2429 Trove: Database instances fail to build with flavors that have ephemeral or swap set (#1846)

* fix: set Skyline prometheus_endpoint to Prometheus in monitoring namespace (#1886)

Signed-off-by: Sowmya Nethi <sowmya.kamavaram@rackspace.com>

* feat(cinder_volumes): configure cinder-rxt and virtualenv deployment (#1887)

- Configure cinder_rxt_git_repo and cinder_rxt_release_branch in role defaults
  (defaulting to cinder-rxt main)
- Add cinder user to disk group and configure systemd-tmpfiles for lock_path
- Deploy modular configuration drop-ins in /etc/cinder/cinder.conf.d/ for lock_path
  and internal_tenant image-volume caching
- Use openstack.cloud module to resolve internal tenant project and user IDs
- Configure virtualenv site-packages eventlet SSL patch and rootwrap exec_dirs
- Create symlink /opt/cinder/etc/cinder -> /etc/cinder

(cherry picked from commit dec6752)

* fix(database): align database timeouts with service timeouts (#1858) (#1888)

(cherry picked from commit 45e1b4e)

* Fix lab_tenant_egress_snat_enabled to default to false (#1895) (#1898)

Closes-Bug: OSPC-2495
(cherry picked from commit c9c6ff6)

Co-authored-by: Bjoern Teipel <bjoern.teipel@rackspace.com>

* feat: add flavor QoS cutover migration tool (#1900) (#1901)

Add a dry-run-first ops tool for migrating legacy Nova flavor bandwidth
limits to Neutron QoS policies.

- define lite, plus, pro, and elite egress policies
- map 80 flavors across DFW, SJC, and IAD regions
- convert Nova kB/s values to rounded Neutron kbps limits
- update flavor extra specs and cached Nova instance flavors
- apply policies to existing compute-owned ports
- fail closed on conflicts, active operations, and concurrent changes
- support multi-cell deployments and guarded rollback
- add unit tests, operator documentation, and a release note

(cherry picked from commit 621d894)

* Release 2026.3.2 rc cp (#1909)

* feat: managed MariaDB port-forward in Genestack. (#1904)

Key behavior:
- --kubectl-port-forward creates a loopback-only tunnel to mariadb-cluster-primary.
- Dynamically selects an available local port.
- Reads mariadb/root-password directly from Kubernetes memory—no credentials file.
- Uses the primary MariaDB service for writes.
- Always terminates the tunnel on:
  - Success
  - Preflight/apply failure
  - Timeout or exception
  - Ctrl-C
  - Startup failure
- Force-kills the subprocess if graceful termination times out.
- Rejects conflicting direct MariaDB connection options.

(cherry picked from commit 2fcef70)

* fix(capi): os_auth_url variable (#1902)

- Add os_admin_password as parameter and retrieve Keystone admin password from the Kubernetes secret
- Add os_auth_url as parameter and retrieve if from a Kubernetes secret

(cherry picked from commit bd440ba)

* fix: moar flavor migration script hardening (#1906)

(cherry picked from commit 7013f84)

---------

Co-authored-by: Bjoern Teipel <bjoern.teipel@rackspace.com>

---------

Signed-off-by: Sowmya Nethi <sowmya.kamavaram@rackspace.com>
Co-authored-by: phillip.toohill <phillip.toohill@rackspace.com>
Co-authored-by: Kevin Ayers <kevin.ayers@rackspace.com>
Co-authored-by: Sowmya Nethi <sowmya.kamavaram@rackspace.com>
Co-authored-by: Dan With <dan.with@rackspace.com>
Co-authored-by: Bjoern Teipel <bjoern.teipel@rackspace.com>
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.

3 participants