Skip to content

jobs/downloads/process_log: Decrease batch size #9195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Jul 31, 2024

On our production servers we've been seeing warnings like:

Failed to fill temp_downloads table: error encoding message to server: value too large to transmit

It looks like this error is returned by tokio-postgres, which can't handle the amount of data we throw at it when using a batch size of 10k rows. This commit decreases the batch size in the hope that this makes the background job succeed. If not, we might have to further decrease it.

A potentially better solution for this would be to use a COPY query, but that wasn't available yet in diesel when the code was originally written.

Related:

On our production servers we've been seeing warnings like:

> Failed to fill temp_downloads table: error encoding message to server: value too large to transmit

It looks like this error is returned by `tokio-postgres`, which can't handle the amount of data we throw at it when using a batch size of 10k rows. This commit decreases the batch size in the hope that this makes the background job succeed. If not, we might have to further decrease it.

A potentially better solution for this would be to use a `COPY` query, but that wasn't available yet in `diesel` when the code was originally written.
@Turbo87 Turbo87 added C-bug 🐞 Category: unintended, undesired behavior A-backend ⚙️ labels Jul 31, 2024
@Turbo87 Turbo87 enabled auto-merge (squash) July 31, 2024 10:11
@Turbo87 Turbo87 merged commit 39fa099 into rust-lang:main Jul 31, 2024
8 checks passed
@Turbo87 Turbo87 deleted the batch-size branch July 31, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend ⚙️ C-bug 🐞 Category: unintended, undesired behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant