#33021 [Bug]: Componentized gateway/backend ignore database pool limits and IAM refresh drops URL parameters
## Check for existing issues
- [x] I searched the existing issues and confirmed this is not a duplicate
Related reports such as [#26619](https://github.com/BerriAI/litellm/issues/26619), [#17281](https://github.com/BerriAI/litellm/issues/17281), and [#15536](https://github.com/BerriAI/litellm/issues/15536) describe connection growth or exhaustion, but none identify the componentized startup path or IAM URL reconstruction defects below
## What happened?
In componentized deployments using `gateway.main:app` and `backend.main:app`, the Prisma connection pool settings from `general_settings` are not applied to the database URLs
There is a second defect when `IAM_TOKEN_DB_AUTH=true`: every IAM token refresh reconstructs the writer or reader URL with only the `schema` query parameter, discarding `connection_limit`, `pool_timeout`, `connect_timeout`, `socket_timeout`, `sslmode`, `pgbouncer`, and any custom query parameters
Together these defects can make active PostgreSQL connections greatly exceed the configured value over a long-running deployment. Each gateway/backend worker or replica owns an independent Prisma pool, so the effective ceiling is already per process. If `connectio…