Skip to content

Conversation

lovrocolic
Copy link
Collaborator

Context

Lago client has issues when passing new charge to 30k child charges.

Description

Instead of using one job to handle all children changes, this PR creates batches of 100 records where one batch is processed in one background job.

Having individual jobs for each child charge also didn't work since too many jobs could be scheduled at the same time and it can lead to OOM issues with redis, depending on the load at that particular moment.

@lovrocolic lovrocolic merged commit d32c944 into main Jun 26, 2025
14 checks passed
@lovrocolic lovrocolic deleted the fix-cascade-charge-creation branch June 26, 2025 06:31
diegocharles pushed a commit that referenced this pull request Jun 30, 2025
## Context

Lago client has issues when passing new charge to 30k child charges.

## Description

Instead of using one job to handle all children changes, this PR creates
batches of 100 records where one batch is processed in one background
job.

Having individual jobs for each child charge also didn't work since too
many jobs could be scheduled at the same time and it can lead to OOM
issues with redis, depending on the load at that particular moment.
diegocharles pushed a commit that referenced this pull request Jul 11, 2025
## Context

Lago client has issues when passing new charge to 30k child charges.

## Description

Instead of using one job to handle all children changes, this PR creates
batches of 100 records where one batch is processed in one background
job.

Having individual jobs for each child charge also didn't work since too
many jobs could be scheduled at the same time and it can lead to OOM
issues with redis, depending on the load at that particular moment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants