Gatsby redux save-state causes excessive disk usage #39282
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
Due to not handling of failure here, for any failed
i
, files from0 - i-1
, remains on the disk, and with each build they keep growing resulting in high disk usage.gatsby/packages/gatsby/src/redux/persist.ts
Lines 190 to 193 in e8e17e7
Each build creates a unique tmpdir - https://github.com/gatsbyjs/gatsby/blob/e8e17e774c4a90333a2277b44733bb4b48f2e102/packages/gatsby/src/redux/persist.ts#L237C18-L237C29
In scenarios, where buffer size exceeds serialization limits, it breaks the for loop.
Reproduction Link
NA
Steps to Reproduce
Cannot share as it's private repo.
Here's a screen recording
2.mp4
Expected Result
Files should be cleaned up properly
Actual Result
Files are not being cleaned up
Environment
Config Flags
NA
The text was updated successfully, but these errors were encountered: