Increase max_connections on Postgres DB

Is there a way to max_connections on postgres dbs?

I wanted to increase the max_connections allowed on my DB since we have some serverless functions that use our DB as well, and the connection count can get quite high when using Vercel to deploy some serverless functions.

@Charlie_Blackstock Something like this should do it.

# SSH into your Postgres app.  
fly ssh console --app <app-name>

# Export the some stolonctl specific environment variables
export $(cat /data/.env | xargs)

# Update stolon spec
stolonctl update --patch '{"pgParameters": { "max_connections": "500"}}'

# Restart 
fly apps restart <app-name>
1 Like