Skip to content

Commit

Permalink
Use multiple threads instead of workers to share memory and fix sessi…
Browse files Browse the repository at this point in the history
…on issues
  • Loading branch information
ivan-c committed Nov 4, 2024
1 parent 53cb0a8 commit 377e203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ EXPOSE "${PORT}"

# launch workers based on number of CPUs: 2n+1
CMD gunicorn \
--workers="$((2*$(nproc)+1))" \
--threads="$((2*$(nproc)+1))" \
--bind "0.0.0.0:${PORT:-8000}" \
${FLASK_APP}

0 comments on commit 377e203

Please sign in to comment.