-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
wp-cli/wp-cli
#5546Labels
Description
Since upgrading to 2.5 seeing a lot of memory issues specifically with db export when exporting to STDOUT
# wp cli version
WP-CLI 2.5.0
# wp ${WPCLIFLAGS} db export - --path="${DOCROOT}" --quiet --single-transaction --quick --lock-tables=false --max_allowed_packet=1G --default-character-set=utf8mb4 --routines --triggers --events | wp ${WPCLIFLAGS} --quiet db import - --path="${DOCROOT}" --ssh="${REMOTEHOST}":"${REMOTEPORT}" --quiet --force --max_allowed_packet=1G
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 534773792 bytes) in phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/utils.php on line 546
^ This failed within 10 seconds of running it, the database is very large.. 20GB but when exporting with 2.4.0 it has no issues.
# php wp-cli-2.4.0.phar ${WPCLIFLAGS} db export - --path="${DOCROOT}" --quiet --single-transaction --quick --lock-tables=false --max_allowed_packet=1G --default-character-set=utf8mb4 --routines --triggers --events | wp ${WPCLIFLAGS} --quiet db import - --path="${DOCROOT}" --ssh="${REMOTEHOST}":"${REMOTEPORT}" --quiet --force --max_allowed_packet=1G
Exporting to file is fine:
# wp db export
Success: Exported to 'wp2656528262db_28193-2021-05-20-6848253.sql'.
STDOUT:
# wp db export -
PHP Fatal error: Allowed memory size of 1342177280 bytes exhausted (tried to allocate 1071644704 bytes) in phar:///usr/bin/wp/vendor/wp-cli/wp-cli/php/utils.php on line 546
aidvu and blakek