Trial and error fixes...

This commit is contained in:
Scott Idem
2024-04-24 16:04:36 -04:00
parent 1d279a2644
commit f9b5186afc
2 changed files with 9 additions and 7 deletions

View File

@@ -71,7 +71,7 @@ AE_DB_PASSWORD="the password with $$ escape"
# wait_timeout (MariaDB) is how long to keep an idle DB connection
AE_DB_WAIT_TIMEOUT=1800 # Not yet used!
# connection_timeout (MariaDB) is how long to try and create a new DB connection; bad handshake
AE_DB_CONNECTION_TIMEOUT=15
AE_DB_CONNECTION_TIMEOUT=15 # (in seconds; default=15)
# pool_recycle (SQLAlchemy) is how long to keep using a particular connection that has passed a certain age
AE_DB_POOL_RECYCLE=1800

View File

@@ -150,6 +150,8 @@ server {
upstream fastapi_backend {
# Balancing: Comment out both ip_hash and least_conn to use the default of round robin
# hash $binary_remote_addr consistent;
# IP hash for sticky sessions/connections load balancing method
# ip_hash;
@@ -163,13 +165,13 @@ upstream fastapi_backend {
# larger number will recieve more requests
# Example of 20 vs 10: 20 will recieve twice as many requests as 10
server aether_api_gunicorn:5005 weight=20 max_fails=2 fail_timeout=30s;
server aether_api_gunicorn_red:5005 weight=20 max_fails=2 fail_timeout=30s;
server aether_api_gunicorn_green:5005 weight=20 max_fails=2 fail_timeout=30s;
server aether_api_gunicorn_blue:5005 weight=20 max_fails=2 fail_timeout=30s;
server aether_api_gunicorn_black:5005 weight=20 max_fails=2 fail_timeout=30s;
server aether_api_gunicorn:5005 weight=20 max_fails=1 fail_timeout=7s;
server aether_api_gunicorn_red:5005 weight=20 max_fails=1 fail_timeout=7s;
server aether_api_gunicorn_green:5005 weight=20 max_fails=1 fail_timeout=7s;
server aether_api_gunicorn_blue:5005 weight=20 max_fails=1 fail_timeout=7s;
server aether_api_gunicorn_black:5005 weight=20 max_fails=1 fail_timeout=7s;
# server aether_api_gunicorn_white:5005 weight=20 max_fails=2 fail_timeout=30s;
# maintain up to 20 idle connections to the group of upstream servers
# keepalive 20;
keepalive 16;
}