From 95388c93c014c4c61a59b6586a688a722b71686d Mon Sep 17 00:00:00 2001 From: Liam Lloyd-Tucker Date: Thu, 30 Jul 2026 17:11:56 -0700 Subject: [PATCH] Set max_conn_age to 60 for MCP Server and MCP Client Currently, the MCP server and clients keep their database connections alive for an hour. At the level of parallelism we'd like to use, this can cause the database to run out of available connections during periods of heavy upload activity. This commit addresses that problem by setting max_conn_age to 60. This will add some overhead to the MCP server and clients as they reestablishes connections more often, but in the context of processing flows that take seconds or minutes that overhead will make only a negligible contribution to overall processing times. --- src/archivematica/MCPClient/settings/common.py | 2 +- src/archivematica/MCPServer/settings/common.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/archivematica/MCPClient/settings/common.py b/src/archivematica/MCPClient/settings/common.py index 4961309882..ec0eed554b 100644 --- a/src/archivematica/MCPClient/settings/common.py +++ b/src/archivematica/MCPClient/settings/common.py @@ -289,7 +289,7 @@ def workers(config, section): "PASSWORD": config.get("db_password"), "HOST": config.get("db_host"), "PORT": config.get("db_port"), - "CONN_MAX_AGE": 3600, # 1 hour + "CONN_MAX_AGE": 60, } } diff --git a/src/archivematica/MCPServer/settings/common.py b/src/archivematica/MCPServer/settings/common.py index a5b324b8ec..9e1d19f665 100644 --- a/src/archivematica/MCPServer/settings/common.py +++ b/src/archivematica/MCPServer/settings/common.py @@ -197,7 +197,7 @@ "PASSWORD": config.get("db_password"), "HOST": config.get("db_host"), "PORT": config.get("db_port"), - "CONN_MAX_AGE": 3600, # 1 hour + "CONN_MAX_AGE": 60, } } @@ -209,6 +209,7 @@ "archivematica.dashboard.main", "archivematica.dashboard.components.administration", "archivematica.dashboard.fpr", + "tastypie", ) # Make this unique, and don't share it with anybody.