Skip to content

Comments

fix: catch serializer errors, prevent OOM on compress error#532

Merged
AlCalzone merged 1 commit intomasterfrom
fix-oom-on-dump-error
Oct 14, 2025
Merged

fix: catch serializer errors, prevent OOM on compress error#532
AlCalzone merged 1 commit intomasterfrom
fix-oom-on-dump-error

Conversation

@AlCalzone
Copy link
Owner

This PR fixes part of the issue diagnosed in zwave-js/zwave-js#8141

In essence, the custom serializer would throw an error during the auto-compression, causing the file handle to stay closed after the attempt. This would lead to the persistence thread repeating the auto-compression over and over, until the application died with an OOM error.

We now catch errors in the serializer and preserve the original value instead. Additionally if the compress task fails (e.g. due to FS permissions), we at least attempt to reopen the file.

@AlCalzone AlCalzone merged commit fd4b6f9 into master Oct 14, 2025
6 checks passed
@AlCalzone AlCalzone deleted the fix-oom-on-dump-error branch October 14, 2025 12:21
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.

1 participant