Skip to content

Commit

Permalink
chore: Bump max memory usage for batch exports (#22895)
Browse files Browse the repository at this point in the history
* chore: Bump max memory usage for batch exports

* fix: Set limt

Co-authored-by: timgl <[email protected]>

---------

Co-authored-by: timgl <[email protected]>
  • Loading branch information
tomasfarias and timgl authored Jun 14, 2024
1 parent fa00f35 commit 601fd3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions posthog/settings/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
)

CLICKHOUSE_MAX_EXECUTION_TIME: int = get_from_env("CLICKHOUSE_MAX_EXECUTION_TIME", 0, type_cast=int)
CLICKHOUSE_MAX_MEMORY_USAGE: int = get_from_env("CLICKHOUSE_MAX_MEMORY_USAGE", 100 * 1000 * 1000 * 1000, type_cast=int)
CLICKHOUSE_MAX_BLOCK_SIZE_DEFAULT: int = get_from_env("CLICKHOUSE_MAX_BLOCK_SIZE_DEFAULT", 10000, type_cast=int)
# Comma separated list of overrides in the format "team_id:block_size"
CLICKHOUSE_MAX_BLOCK_SIZE_OVERRIDES: dict[int, int] = dict(
Expand Down
1 change: 1 addition & 0 deletions posthog/temporal/common/clickhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ async def get_client(
password=settings.CLICKHOUSE_PASSWORD,
database=settings.CLICKHOUSE_DATABASE,
max_execution_time=settings.CLICKHOUSE_MAX_EXECUTION_TIME,
max_memory_usage=settings.CLICKHOUSE_MAX_MEMORY_USAGE,
max_block_size=max_block_size,
output_format_arrow_string_as_string="true",
**kwargs,
Expand Down

0 comments on commit 601fd3a

Please sign in to comment.