fix: upgrade longtermwiki DB to 2-vCPU/4GB and increase pool size#53
Open
fix: upgrade longtermwiki DB to 2-vCPU/4GB and increase pool size#53
Conversation
The 1-vCPU/2GB Postgres instance was being starved by materialized view refreshes, causing 30-60s query latency on all other connections. Upgrading to 2-vCPU/4GB gives headroom for concurrent operations. Also increase PgBouncer connection pool from 10 to 22 to reduce the impact of long-running queries occupying pool slots. Related: #52 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
db-s-1vcpu-2gbtodb-s-2vcpu-4gbto handle concurrent materialized view refreshes without starving other queriesContext
The 1-vCPU instance was being saturated by
REFRESH MATERIALIZED VIEWoperations, causing 30-60s latency on all other queries including health checks. See investigation comment.The app-level fix (debouncing the refresh) is in longterm-wiki#1639. This PR addresses the infra side.
Test plan
terraform planshows only the DB resize and pool size changeRelated: #52
🤖 Generated with Claude Code