Skip to content

fix: add missing DB pool settings to Settings — CRITICAL deploy blocker (#197)#197

Open
welshDog wants to merge 1 commit intomainfrom
fix/missing-db-pool-settings
Open

fix: add missing DB pool settings to Settings — CRITICAL deploy blocker (#197)#197
welshDog wants to merge 1 commit intomainfrom
fix/missing-db-pool-settings

Conversation

@welshDog
Copy link
Copy Markdown
Owner

@welshDog welshDog commented May 1, 2026

🚨 THIS WAS THE REAL DEPLOY BLOCKER

The Error

AttributeError: 'Settings' object has no attribute 'DB_POOL_SIZE'
  File "/app/app/db/session.py", line 15, in <module>
    pool_size=settings.DB_POOL_SIZE,

The app was crashing before Uvicorn even started — which explains why Railway's healthcheck saw zero HTTP requests reaching the container. Not a routing issue. Not a port issue. A hard Python crash at import time.

Root Cause

session.py references 4 Settings attributes that didn't exist:

  • settings.DB_POOL_SIZE
  • settings.DB_POOL_MAX_OVERFLOW
  • settings.DB_POOL_TIMEOUT
  • settings.DB_POOL_RECYCLE_TIMEOUT

Fix

Added all 4 to Settings class in config.py with Railway-safe defaults:

# Database connection pool — Railway-safe defaults
DB_POOL_SIZE: int = 5
DB_POOL_MAX_OVERFLOW: int = 10
DB_POOL_TIMEOUT: int = 30
DB_POOL_RECYCLE_TIMEOUT: int = 3600

Expected result after merge

  • App boots cleanly ✅
  • Uvicorn starts on 0.0.0.0:8000 ✅
  • Railway healthcheck GET /health returns 200 ✅
  • Deploy goes green ✅

session.py references DB_POOL_SIZE, DB_POOL_MAX_OVERFLOW,
DB_POOL_TIMEOUT and DB_POOL_RECYCLE_TIMEOUT but none of these
existed in the Settings class, causing AttributeError on startup
and 18+ consecutive Railway deploy failures.

Adds sensible Railway-safe defaults (pool_size=5, max_overflow=10).
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Warning

Rate limit exceeded

@welshDog has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 16 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a4bd741e-63de-4932-adef-dc389b70662a

📥 Commits

Reviewing files that changed from the base of the PR and between f8590bd and a204221.

📒 Files selected for processing (1)
  • backend/app/core/config.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/missing-db-pool-settings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 52 minutes and 16 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant