Skip to content

Conversation

schlessera
Copy link
Member

@schlessera schlessera commented Jul 20, 2021

This fixes the out-of-memory errors on db export to STDOUT by using fpassthru() when $send_to_shell is true, instead of using stream_get_contents().

This is technically not a full fix, as the stream is still fully read when $send_to_shell is false, however there's no current use case I can think of where that would matter.

Fixes wp-cli/db-command#195

@schlessera schlessera force-pushed the fix/195-stdout-oom branch from 6f04035 to ef8e7e1 Compare July 20, 2021 19:54
@schlessera schlessera marked this pull request as ready for review July 20, 2021 20:58
@schlessera schlessera requested a review from a team as a code owner July 20, 2021 20:58
@schlessera schlessera merged commit 5e5816e into master Jul 20, 2021
@schlessera schlessera deleted the fix/195-stdout-oom branch July 20, 2021 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export to STDOUT loads entire DB into memory at once
1 participant