Skip to content

Commit

Permalink
Merge pull request #222 from lsst-sqre/tickets/DM-28120
Browse files Browse the repository at this point in the history
[DM-28120] Cap FastAPI workers to 10
  • Loading branch information
rra authored Apr 26, 2021
2 parents 9a8740e + 04f218c commit 157f27f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ repos:
additional_dependencies:
# Manually mirror dev dependencies related to eslint here
- babel-eslint@10.1.0
- eslint@7.24.0
- eslint@7.25.0
- eslint-config-airbnb@18.2.1
- eslint-config-prettier@6.15.0
- eslint-config-wesbos@1.0.1
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Change log
##########

2.0.1 (2021-04-26)
==================

- Cap workers spawned by the Docker image at 10.
The defaults spawned 32 workers in a GKE container, which overwhelmed the available open connections with a micro Cloud SQL server.
- Update JavaScript dependencies.

2.0.0 (2021-04-23)
==================

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,10 @@ ENV PATH="/opt/venv/bin:$PATH"
# modified by the virtualenv.
ENV MODULE_NAME=gafaelfawr.main

# The default starts 40 workers, which exhausts the available connections
# on a micro Cloud SQL PostgreSQL server and seems excessive since we can
# scale with Kubernetes. Cap the workers at 10.
ENV MAX_WORKERS=10

# Run on port 8080 instead of the FastAPI default for backward compatibility.
ENV PORT=8080

0 comments on commit 157f27f

Please sign in to comment.