fix: database connection stability issues in production
Test and Lint / backend-test (push) Successful in 1m9s
continuous-integration/drone/push Build is passing
Test and Lint / frontend-test (push) Successful in 2m10s
Version and Release / version-bump (push) Successful in 32s
Version and Release / trigger-drone (push) Successful in 3s
Test and Lint / backend-test (push) Successful in 1m9s
continuous-integration/drone/push Build is passing
Test and Lint / frontend-test (push) Successful in 2m10s
Version and Release / version-bump (push) Successful in 32s
Version and Release / trigger-drone (push) Successful in 3s
- Add robust connection pool configuration with timeouts and retry settings - Implement retry logic in maintenance middleware for connection errors - Increase connection stability with keepAlive and proper timeout values - Handle "Connection terminated unexpectedly" errors gracefully This prevents 503 errors when the database connection is temporarily interrupted and ensures the application can recover from transient connection issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const knex = require('knex');
|
||||
const knexConfig = require('../../knexfile');
|
||||
|
||||
// Create database connection with built-in retry logic
|
||||
const db = knex(knexConfig);
|
||||
|
||||
async function initializeDatabase() {
|
||||
|
||||
Reference in New Issue
Block a user