Repository navigation
feat: Make the max_connections of the shared PostgreSQL configurable - #516
Conversation
Deploy Cloud Foundry from the ZPascal/kind-deployment fork, which has cloudfoundry/kind-deployment#516, and drop the Postgres restart workaround. Revert to the cloudfoundry/kind-deployment pin once cloudfoundry#516 is merged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cd113ec to
15c6f6b
Compare
…nnections Don't change the PostgreSQL default of 100 connections for everybody. max_connections is only set when POSTGRES_MAX_CONNECTIONS (or the postgres.maxConnections Helmfile value) is given, and the setup-cf action exposes it as the postgres-max-connections input.
0ed3113 to
4d1dc90
Compare
|
Hi, I see the use case and this will work of course. But for this rather specific case, it is a bit too much imho. The environment variable and the changes to the github action are only convinience, so I am not sure if this is worth it. Alternative: WDYT? |
…ted input Drops the setup-cf input and env var; max_connections is now set through additional-values-files. Documented in the README.
I've updated the implementation. |
All Cloud Foundry components share one PostgreSQL instance. With its default of 100 connections, it can run out during a long load, and UAA (and then everything that needs a token) fails with
FATAL: sorry, too many clients already.I ran into this when running the integration tests of cf-java-client against kind-deployment (cloudfoundry/cf-java-client#1381, related to #339): after roughly 30-50 minutes, every Spring test context failed with
scim: Failed to obtain JDBC Connection, and 529 to 901 of 903 tests errored.The default stays as it is. This PR only makes
max_connectionsconfigurable, so a workflow that needs more connections can ask for them when PostgreSQL is installed. The alternative is to raise the limit after the deployment withALTER SYSTEM, restart PostgreSQL, and then restart every component that holds pooled connections (the cloud controller does not validate pooled connections and answers a 500 for each dead one).Verification
cloudfoundry/cf-java-client#1381