Fix invalid PostgreSQL MAX_CONNS configuration option

- Remove MAX_CONNS from database OPTIONS as it's not a valid psycopg2 parameter
- Keep isolation_level setting for PostgreSQL optimization
- This resolves ProgrammingError: invalid connection option "MAX_CONNS"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
thecyberlearn 2025-09-05 08:53:52 +05:30
parent 133b3f1d50
commit 28d41d5a44

View File

@ -199,11 +199,8 @@ if database_url:
# Add PostgreSQL optimization settings
if psycopg2:
db_config['OPTIONS'] = {
'MAX_CONNS': 20,
'OPTIONS': {
'isolation_level': psycopg2.extensions.ISOLATION_LEVEL_READ_COMMITTED,
}
}
# Connection pooling and performance settings
db_config['CONN_MAX_AGE'] = 600