Skip to content

test(synology): raise test JVM heap to 1g to avoid OOM#1498

Merged
simonxander merged 1 commit into
masterfrom
fix/synology-test-oom
Jun 23, 2026
Merged

test(synology): raise test JVM heap to 1g to avoid OOM#1498
simonxander merged 1 commit into
masterfrom
fix/synology-test-oom

Conversation

@alexeyqu

Copy link
Copy Markdown
Collaborator

Problem

The Synology test suite OOMs in CI on shouldThrowExceptionIfSendPostRequestFailed [2] VideoModel -- which was identified after investigation in #1495. This blocks the CI.

uploadVideoChunks pre-allocates two 50MB byte arrays into a buffer pool on every call. shouldSendMultipleChunksForLargeVideo leaves ~150MB live (50MB content + 100MB pool).

The next test immediately allocates another 100MB pool before GC has a chance to clear the previous one -- exceeding the default test JVM heap.

The maxHeapSize setting only affects the test JVM, not Gradle itself or production runtime.

What's not fixed

The root cause -- uploadVideoChunks pre-allocating 100MB regardless of file size -- is a production-code issue. Lazy buffer allocation (allocate on demand, release after consumer finishes) would fix both the test OOM and the memory waste on small files.

That's a more invasive change left for a follow-up.

cc @simonxander or @mengyushen -- let's discuss the 100MB buffer after the CI is unblocked.

@simonxander simonxander merged commit 2523b09 into master Jun 23, 2026
6 checks passed
@simonxander simonxander deleted the fix/synology-test-oom branch June 23, 2026 03:08
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