Skip to content

fix(asg): bound app DB waits after switchover with socket timeouts - #772

Merged
anton061311 merged 1 commit into
devfrom
fix/760-db-socket-timeout
Dec 2, 2026
Merged

anton061311 merged 1 commit into
devfrom
fix/760-db-socket-timeout

Conversation

@anton061311

@anton061311 anton061311 commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

1. 📝 요약

After a replica switchover one new pool connection hung 53 s, emptying the Hikari pool. App DB_URL now has connectTimeout 3 s and socketTimeout 10 s.

2. 🔧 변경 사항

  • Flyway gets its own untimed URL and user, so long migrations are not cut.
  • ADR-0012 and switchover README record cause and numbers.

3. 🔎 리뷰 포인트

  • 1 app, ~20 rps, manual switch: untimed, 1 of 4 rounds hung 53 s with 503s. Timed, 0 of 8 emptied the pool, but none hung past 10 s.
  • Shorter 6.6 s hangs remain.
  • 10-50 s lock waits now return 500, not conflict. Never observed.

4. 🧪 테스트

  • Local blackhole, same Hikari and driver: pool empty 30 s untimed, 10 s timed.
  • Local app: Flyway ran 46 migrations as its own user.
  • 독립 검증 없음: merge-gate medium tier, author check, CI, diff review

5. 🔗 관련 이슈

Closes #760

… connect timeouts

A new pool connection opened to the old DB right before the VIP move could
wait 53 s for a reply that never came, leaving the Hikari pool empty and the
app unhealthy. Add connectTimeout=3000 and socketTimeout=10000 to the app
DB_URL, and give Flyway its own untimed URL and credentials so long
migrations are not cut. Record the 12 AWS rounds and the local blackhole
test in ADR-0012 and the switchover README.

Refs #760
@anton061311 anton061311 added this to the Phase 4 - Fanq milestone Dec 2, 2026
@anton061311 anton061311 added the fix Bug fix label Dec 2, 2026
@anton061311 anton061311 self-assigned this Dec 2, 2026
@anton061311
anton061311 merged commit 6588f8e into dev Dec 2, 2026
3 checks passed
@anton061311
anton061311 deleted the fix/760-db-socket-timeout branch December 3, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Test] 전환 뒤 52초 연결 멈춤 원인 재현 측정

1 participant