Skip to content

Commit

Permalink
server: add missing args env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Jun 19, 2024
1 parent 6c64748 commit 0242b97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/reference/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ and ``*_ENV`` variants are also supported.
.. _URI format:
https://www.postgresql.org/docs/13/libpq-connect.html#id-1.7.3.8.3.6

EDGEDB_SERVER_MAX_BACKEND_CONNECTIONS
.....................................

The maximum NUM of connections this EdgeDB instance could make to the backend
PostgreSQL cluster. If not set, EdgeDB will detect and calculate the NUM:
RAM/100MiB for local Postgres, or pg_settings.max_connections for remote
Postgres minus the NUM of ``--reserved-pg-connections``.

EDGEDB_SERVER_BINARY_ENDPOINT_SECURITY
......................................
Expand Down
5 changes: 5 additions & 0 deletions edb/server/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,7 @@ def resolve_envvar_value(self, ctx: click.Context):
f'by default)'),
click.option(
'--max-backend-connections', type=int, metavar='NUM',
envvar="EDGEDB_SERVER_MAX_BACKEND_CONNECTIONS",
help=f'The maximum NUM of connections this EdgeDB instance could make '
f'to the backend PostgreSQL cluster. If not set, EdgeDB will '
f'detect and calculate the NUM: RAM/100MiB='
Expand All @@ -740,11 +741,13 @@ def resolve_envvar_value(self, ctx: click.Context):
callback=_validate_max_backend_connections),
click.option(
'--compiler-pool-size', type=int,
envvar="EDGEDB_SERVER_COMPILER_POOL_SIZE",
callback=_validate_compiler_pool_size),
click.option(
'--compiler-pool-mode',
type=CompilerPoolModeChoice(),
default=CompilerPoolMode.Default.value,
envvar="EDGEDB_SERVER_COMPILER_POOL_MODE",
help='Choose a mode for the compiler pool to scale. "fixed" means the '
'pool will not scale and sticks to --compiler-pool-size, while '
'"on_demand" means the pool will maintain at least 1 worker and '
Expand All @@ -756,6 +759,7 @@ def resolve_envvar_value(self, ctx: click.Context):
'--compiler-pool-addr',
hidden=True,
callback=_validate_host_port,
envvar="EDGEDB_SERVER_COMPILER_POOL_ADDR",
help=f'Specify the host[:port] of the compiler pool to connect to, '
f'only used if --compiler-pool-mode=remote. Default host is '
f'localhost, port is {defines.EDGEDB_REMOTE_COMPILER_PORT}',
Expand All @@ -765,6 +769,7 @@ def resolve_envvar_value(self, ctx: click.Context):
hidden=True,
type=int,
default=100,
envvar="EDGEDB_SERVER_COMPILER_POOL_TENANT_CACHE_SIZE",
help="Maximum number of tenants for which each compiler worker can "
"cache their schemas, "
"only used when --compiler-pool-mode=fixed_multi_tenant"
Expand Down

0 comments on commit 0242b97

Please sign in to comment.