mcp 0.5.0 - tested connection pooling with postgres tool, completely broken
tested mcp 0.5.0 patch 2 in staging yesterday with postgres tool that opens db connections. connection pooling is completely broken: 1. each tool invocation opens a new connection and never closes it 2. after 47 tool calls we hit max connections (default postgres limit 100) 3. subsequent tool calls just fail with "too many connections" error 4. restarting the agent doesnt help because connections persist at the db level we had to manually patch connection pooling at the tool wrapper layer. is this expected behavior or am i missing some config option for connection lifecycle management
We hit something similar with postgres tools in our staging environment last week - connection pooling in mcp 0.5.0 is completely broken. Each tool call opens a new connection and never closes it, so after ~15 agent runs we max out the pool and everything just hangs. Had to patch manual connection cleanup into our wrapper. The worst part is there's zero indication in the logs that you're leaking connections until the pool is exhausted. Are you seeing the same behavior where connections just accumulate forever?
ok so we hit this exact pattern in staging with a redis tool - connection pooling just completely broken, every tool call opens new connection and never closes. had to patch manual connection cleanup at 0.5.0-patch3