bug: DatabaseDumper loads entire SQL dump into RAM — OOM on large sites #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: CRITICAL
DatabaseDumper::dump()returns the entire SQL dump as a single string.BackupEngine::run()then passes it to$archiver->addFromString(). A 500 MB database allocates the dump 2-3x in RAM (array + implode + ZipArchive buffer), exceeding the 512 MB memory limit.SteppedBackupEnginealready writes to a temp file incrementally — the synchronous engine should do the same.Fix
Write the dump to a temp
.sqlfile and use$archiver->addFile()instead ofaddFromString().Files
src/Engine/BackupEngine.php:136-138src/Engine/DatabaseDumper.php— add streaming/file-based dump method