pub fn config_from_env() -> Result<AppConfig, Error>Expand description
The configuration from the environment, sized for a Lambda sandbox.
A sandbox answers one invocation at a time, so the server’s default pool
holds connections nothing will use – and every concurrent sandbox holds
its own, which is how a burst of Lambdas exhausts max_connections. The
pool is two connections unless PGRST_DB_POOL or PGRST_DB_POOL_SIZE
says otherwise; two rather than one because a GraphQL mutation holds a
transaction while its resolvers read.