~qeef/damn-deploy

60066dc885521737de9ab99e7ee465fed54a13f6 — Jiri Vlasak a month ago a14f0a1
Limit maximum workers to 9

The 9 is maximum because each worker uses database pool connection in
damn server. The database pool of asyncpg [1] has by default min/max
number of connection set up to 10. The PostgreSQL [2] database has the
default of 100 maximum connections. So, 9 x 10 = 90 < 100, there is 10
connections backup (for admin connections or so on.)

[1]: https://magicstack.github.io/asyncpg/current/index.html
[2]: https://www.postgresql.org/
2 files changed, 6 insertions(+), 1 deletions(-)

M CHANGELOG.md
M server/Dockerfile
M CHANGELOG.md => CHANGELOG.md +5 -0
@@ 12,6 12,11 @@ The format is based on [Keep a Changelog][] and this project adheres to
Unreleased
==========

Changed
-------

- Set the maximum workers to 9.


0.9.2 - 2020-11-14
==================

M server/Dockerfile => server/Dockerfile +1 -1
@@ 3,7 3,7 @@ FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7
ARG DAMN_SERVER_VERSION

ENV MODULE_NAME damn_server.api
ENV MAX_WORKERS 100
ENV MAX_WORKERS 9

RUN rm -rf /app
RUN git clone \