From 8f1f546f6950739e79ee53fc62200743242fe2b7 Mon Sep 17 00:00:00 2001 From: Athanasios Voutsadakis Date: Thu, 29 Mar 2018 14:57:19 +0100 Subject: [PATCH] Increase pool size to 15 permanent connections At the same time, decrease the number of workers from 5 to 4. Effect on max db connections will be the same - although with a higher "resting" number of connections. Before: 12 (instances) * 5 (workers) * 20 (10 permanent + 10 overflow) = 1200 After: 12 (instances) * 4 (workers) * 25 (15 permanent + 10 overflow) = 1200 --- gunicorn_config.py | 2 +- manifest-api-base.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gunicorn_config.py b/gunicorn_config.py index b3e7ddf90..c74012969 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -2,7 +2,7 @@ import os import sys import traceback -workers = 5 +workers = 4 worker_class = "eventlet" worker_connections = 256 errorlog = "/home/vcap/logs/gunicorn_error.log" diff --git a/manifest-api-base.yml b/manifest-api-base.yml index e8197575f..28ca9ef5a 100644 --- a/manifest-api-base.yml +++ b/manifest-api-base.yml @@ -9,7 +9,7 @@ env: CW_APP_NAME: api # required by cf run-task FLASK_APP: application.py - SQLALCHEMY_POOL_SIZE: 10 + SQLALCHEMY_POOL_SIZE: 15 # Credentials variables ADMIN_BASE_URL: null