I am trying to sync a 1gb table from Mysql to clickhouse. The source download completes but the normalization to clickhouse fails with a memory exception.
Code: 241. DB::Exception: Memory limit (total) exceeded: would use 14.00 GiB (attempt to allocate chunk of 4259840 bytes), maximum: 13.94 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.: While executing Mer
compiled Code at ../build/run/airbyte_utils/models/generated/airbyte_incremental/scd/fm_revive/rv_data_summary_Dev_ad_hourly_scd.sql,retryable=<null>,timestamp=1670421696119], io.airbyte.config.FailureReason@7c411496[failureOrigin=normalization,failureType=system_error,internalMessage=:HTTPDriver url http://172.31.45.109:8123 returned response code 500),externalMessage=Normalization failed during the dbt run. This may indicate a problem with the data itself.,metadata=io.airbyte.config.Metadata@212b1f9f[additionalProperties={attemptNumber=0, jobId=13, from_trace_message=true}],stacktrace=AirbyteDbtError:
38 of 72 ERROR creating sql incremental model fm_revive.rv_data_summary_Dev_ad_hourly_scd .............................. [ERROR in 284.88s]
Database Error in model rv_data_summary_Dev_ad_hourly_scd (models/generated/airbyte_incremental/scd/fm_revive/rv_data_summary_Dev_ad_hourly_scd.sql)
:HTTPDriver url http://172.31.45.109:8123 returned response code 500)
Code: 241. DB::Exception: Memory limit (total) exceeded: would use 14.00 GiB (attempt to allocate chunk of 4259840 bytes), maximum: 13.94 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.: While executing Mer
compiled Code at ../build/run/airbyte_utils/models/generated/airbyte_incremental/scd/fm_revive/rv_data_summary_Dev_ad_hourly_scd.sql
38 of 72 ERROR creating sql incremental model fm_revive.rv_data_summary_Dev_ad_hourly_scd .............................. [ERROR in 284.88s]
Database Error in model rv_data_summary_Dev_ad_hourly_scd (models/generated/airbyte_incremental/scd/fm_revive/rv_data_summary_Dev_ad_hourly_scd.sql)
:HTTPDriver url http://172.31.45.109:8123 returned response code 500)
Code: 241. DB::Exception: Memory limit (total) exceeded: would use 14.00 GiB (attempt to allocate chunk of 4259840 bytes), maximum: 13.94 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.: While executing Mer
compiled Code at ../build/run/airbyte_utils/models/generated/airbyte_incremental/scd/fm_revive/rv_data_summary_Dev_ad_hourly_scd.sql,retryable=<null>,timestamp=1670421696119]]]
2022-12-07 14:01:36 normalization > HTTPDriver url http://172.31.45.109:8123 returned response code 500)
2022-12-07 14:01:36 normalization > Code: 241. DB::Exception: Memory limit (total) exceeded: would use 14.00 GiB (attempt to allocate chunk of 4259840 bytes), maximum: 13.94 GiB. OvercommitTracker decision: Query was selected to stop by OvercommitTracker.: While executing MergeSortingTransform. (MEMORY_LIMIT_EXCEEDED) (version 22.11.1.1058 (official build))
2022-12-07 14:01:36 normalization >
2022-12-07 14:01:36 INFO i.a.w.t.TemporalAttemptExecution(get):162 - Stopping cancellation check scheduling...
2022-12-07 14:01:36 INFO i.a.c.t.TemporalUtils(withBackgroundHeartbeat):283 - Stopping temporal heartbeating...
2022-12-07 14:01:36 INFO i.a.c.i.LineGobbler(voidCall):114 -
2022-12-07 14:01:36 INFO i.a.c.i.LineGobbler(voidCall):114 - ----- END DEFAULT NORMALIZATION -----
2022-12-07 14:01:36 INFO i.a.c.i.LineGobbler(voidCall):114 -
The airbyte server has 8GB RAM, the clickhouse server has 16GB RAM.
Is it possible to reduce the batch size for the data being pushed into the destination to handle this within 16GB RAM. What will be the RAM of the server needed to sync tables above 10GB or 50GB etc?