Bird
0
0

Given this Flask-SQLAlchemy setup:

medium📝 component behavior Q13 of 15
Flask - Performance Optimization
Given this Flask-SQLAlchemy setup:
app.config['SQLALCHEMY_POOL_SIZE'] = 5
app.config['SQLALCHEMY_MAX_OVERFLOW'] = 10

What is the maximum number of simultaneous database connections allowed?
A15
B10
C5
D20
Step-by-Step Solution
Solution:
  1. Step 1: Understand pool size and max overflow

    Pool size is 5 connections kept open. Max overflow allows 10 extra temporary connections.
  2. Step 2: Calculate total max connections

    Total max = pool size (5) + max overflow (10) = 15 connections.
  3. Final Answer:

    15 -> Option A
  4. Quick Check:

    Max connections = pool size + overflow = 15 [OK]
Quick Trick: Add pool size and max overflow for max connections [OK]
Common Mistakes:
MISTAKES
  • Ignoring max overflow and choosing pool size only
  • Adding incorrectly or mixing values
  • Confusing max overflow as total limit

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes