Skip to content

Set max_conn_age to 60 for MCP Server and MCP Client - #23

Closed
liam-lloyd wants to merge 1 commit into
mainfrom
noissue_dont_persist_database_connections_from_mcp_server
Closed

liam-lloyd wants to merge 1 commit into
mainfrom
noissue_dont_persist_database_connections_from_mcp_server

Conversation

@liam-lloyd

@liam-lloyd liam-lloyd commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

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 reestablishe 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.

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.
@liam-lloyd
liam-lloyd marked this pull request as draft September 9, 2026 19:13
@liam-lloyd liam-lloyd closed this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant