Bird
0
0

Which of the following is the correct way to specify 3 worker processes when starting Gunicorn for a Flask app named app in module server?

easy📝 Syntax Q3 of 15
Flask - Performance Optimization
Which of the following is the correct way to specify 3 worker processes when starting Gunicorn for a Flask app named app in module server?
Agunicorn -w 3 server:app
Bgunicorn --workers=3 server.app
Cgunicorn -workers 3 server:app
Dgunicorn -w3 server:app
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct flag for workers

    The flag to specify number of workers is '-w' followed by a space and the number.
  2. Step 2: Confirm module and app format

    The correct format is 'module:app', so 'server:app' is correct.
  3. Final Answer:

    gunicorn -w 3 server:app -> Option A
  4. Quick Check:

    Workers flag = -w number [OK]
Quick Trick: Use '-w number' to set workers, no equals sign [OK]
Common Mistakes:
MISTAKES
  • Using dot instead of colon between module and app
  • Using '--workers' with equals sign which is invalid
  • Combining flag and number without space

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Flask Quizzes