Yoast / Yoast/wordpress-seo

Out of memory errors in XML sitemaps after upgrading from Yoast SEO 6 to 9.2.1

Open
#11,684 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

component: performance innovation needs-investigation severity: minor Yoast: Management
Dominant language
JavaScript
Stars
2k
Forks
975
Avg merge
3d 13h
Merged PRs (30d)
36

Description

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.

After upgrading from WP SEO 6, which I've hung on to for a while because of several performance issues that weren't fixed until v9.1 or v9.2, https://www.androidpolice.com/sitemap_index.xml started returning an error 500. The details are:

Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)

You can see the Sentries for it here:
https://sentry.io/share/issue/e48ab4a472d743bca4af14bc7d7d0310/
https://sentry.io/share/issue/254e77128fbb4fd49d162e5a2d32d459/

This was never a problem before.

Note: I do use W3 Total Cache in case it matters.

I would maybe expect an OOM to happen in individual sitemap shards, like https://www.androidpolice.com/post-sitemap1.xml, which is why the setting for the number of posts per sitemap used to exist (and I had to bump it down to 500), but those actually seem to load OK. It's just the master sitemap index that isn't loading.

Technical info
Used versions
  • WordPress version: 4.9.8
  • Yoast SEO version: 9.2.1
  • Relevant plugins in case of a bug:

W3 Total Cache 0.9.6.1

  • Tested with theme: custom

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the 500 and memory exhaustion at androidpolice.com/sitemap_index.xml, then compare it with the working post-sitemap1.xml shard under the reported WordPress 4.9.8 and Yoast SEO 9.2.1 setup. Done means the master sitemap index loads without exhausting memory, including when W3 Total Cache is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
performance, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.