Cap the forge's database pool at 40: the store's 100 connections are shared (issue 1966, recovery) #632

Merged
mesh-tools merged 1 commits from fix/1966-forge-pool-cap into main 2026-11-08 01:08:37 +00:00
Member

Recovery fix (mesh instruction recovery-fixes-merge-and-tell), on the operator's yes (2026-11-08 ~02:00, "cap the forge pool"); merged by lead-47@shanks, the operator told at the terminal.

Cause. The gitea module set no database pool limit (gitea 1.27.3 default MAX_OPEN_CONNS 0, unlimited). The store on novox has max_connections 100 for every module there. Live 2026-11-08 01:35-02:07: the forge held 40-84 connections, the store refused everyone else in bursts ('remaining connection slots are reserved'): builds, a push to hq, the knowledge base and the store's own reader failed.

Fix. files/server.env: GITEA__database__MAX_OPEN_CONNS=40, MAX_IDLE_CONNS=10, CONN_MAX_LIFETIME=5m. Over 40 the forge's requests wait for a connection (database/sql), they do not fail. Checked in the 1.27.3 source: SSH gitea serv and the git hooks reach the database through the main server's private API, so this pool carries them; admin-bootstrap reads the same env file. The delivery recreates only the forge container (changed env-file digest).

Quick vs thorough. This is the quick, one-module guard for the store. The cause of the demand (Go builds' git fan-out and the callers of the forge's API) is a note on issue 1966 for a thorough fix.

Watch after delivery. pg_stat_activity: the forge at 40 or fewer, no refusals; the forge's health and latency (a transaction holding one connection while asking a second could stall under a cap).

Tests. modules/gitea/test/pool-cap.test.ts (fails without the change).

Undo. Revert this merge commit.

Reviewed-by: mesh-code-reviewer@shanks at b4192c525e

https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5

Recovery fix (mesh instruction recovery-fixes-merge-and-tell), on the operator's yes (2026-11-08 ~02:00, "cap the forge pool"); merged by lead-47@shanks, the operator told at the terminal. **Cause.** The gitea module set no database pool limit (gitea 1.27.3 default MAX_OPEN_CONNS 0, unlimited). The store on novox has max_connections 100 for every module there. Live 2026-11-08 01:35-02:07: the forge held 40-84 connections, the store refused everyone else in bursts ('remaining connection slots are reserved'): builds, a push to hq, the knowledge base and the store's own reader failed. **Fix.** files/server.env: GITEA__database__MAX_OPEN_CONNS=40, MAX_IDLE_CONNS=10, CONN_MAX_LIFETIME=5m. Over 40 the forge's requests wait for a connection (database/sql), they do not fail. Checked in the 1.27.3 source: SSH `gitea serv` and the git hooks reach the database through the main server's private API, so this pool carries them; admin-bootstrap reads the same env file. The delivery recreates only the forge container (changed env-file digest). **Quick vs thorough.** This is the quick, one-module guard for the store. The cause of the demand (Go builds' git fan-out and the callers of the forge's API) is a note on issue 1966 for a thorough fix. **Watch after delivery.** pg_stat_activity: the forge at 40 or fewer, no refusals; the forge's health and latency (a transaction holding one connection while asking a second could stall under a cap). **Tests.** modules/gitea/test/pool-cap.test.ts (fails without the change). **Undo.** Revert this merge commit. Reviewed-by: mesh-code-reviewer@shanks at b4192c525e7e1daad00e343ea75d6c396d913a2b https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
mesh-tools added 1 commit 2026-11-08 01:08:32 +00:00
Cap the forge's database pool at 40 open connections: the store's 100 are shared by every module (issue 1966)
mesh/delivery merged: source.main moved to novox/mesh-catalog@61737962fcb6
mesh/check failed (3): ace: the check of novox/mesh-catalog#632 failed: downloading the asked version 68581…; and 2 more | b4192c525e7e on 61737962fcb6
b4192c525e
Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
mesh-tools merged commit 61737962fc into main 2026-11-08 01:08:37 +00:00
Author
Member

Delivery novox/mesh-catalog@b4192c525e7e — merged since 2026-11-08T01:08:40Z

Source — source.main moved to novox/mesh-catalog@61737962fc. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-11-08 01:08 (new) → proposed (announced): novox/mesh-catalog#632's head announced
  • 2026-11-08 01:08 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-11-08 01:08 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@b4192c525e7e` — **merged** since 2026-11-08T01:08:40Z **Source** — source.main moved to novox/mesh-catalog@61737962fcb6. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-11-08 01:08 (new) → proposed (announced): novox/mesh-catalog#632's head announced - 2026-11-08 01:08 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-11-08 01:08 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools deleted branch fix/1966-forge-pool-cap 2026-11-08 01:08:38 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#632