wp-cli: Potential memory leaks with WXR export

I’m currently working on exporting a rather large data set (~225,000 posts/attachments), split into 5MB chunks via the wp export command with the --max_file_size=5 argument. Even when I limit the post dates to a very narrow range, the memory used by the process will continue to grow until it hits PHP’s limit (6GB on this particular server), at which point the export process will be killed.

As the process runs (and continues to write files–usually 12-15 before it crashes), the memory consumed by the process continues to grow; I’d expect some holdover as files are split, but not 6GB-worth.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

Have you run into the issue recently, and/or can you provide more details on how I might be able to reproduce?

Actually, it wasn’t so difficult to reproduce once I took a look 😄