Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yoast Page Sitemap Not Loading On Website With 500-600 pages Out Of Memory But Already Maxed Hosting Provider's Memory #22012

Open
TNHSAesop opened this issue Feb 2, 2025 · 2 comments

Comments

@TNHSAesop
Copy link

Hi there,

I have a website that's a Beaver Builder website. I recently start doing some programmatic SEO stuff and added in about 350 pages to my website bringing the total number of pages on the site to around 500 pages. I have started bumping into some out of memory exceptions. I have increased the memory to the point where I have maxed the amount of allowable memory that my hosting provider offers (Kinsta). I have 4 threads with 1024MB per thread and am still getting out of memory exceptions when loading my page sitemap.

I am honestly shocked at this though because knowing what I know about database queries making a query for a list of pages should be an EXTREMELY efficient operation assuming there are the appropriate indexes on the table. Since we are talking about the post IDs where post type = page type of query I have to assume there are indexes there but maybe not.

I am trying to restore the loading of my page sitemap. I tried cutting down the max number of entries per page to 250 but even then I am still getting out of memory exceptions. I don't think cutting down the max number of entries per page is the ultimate cure for the problems I am looking for. I am in touch with Beaver Builder to try to reduce the size of my post meta table as it is rather large and I suspect the reason for the OOM exceptions, but at the same time I view this as more of a query design problem than a table size problem. The only way I can think that Yoast would be running out of memory when querying sitemaps is that it's querying for data that it does not need to make a sitemap. Or there are indexes that need to be added to tables on higher volume websites.

Is there something I can do such as add an index to my WP DB tables to make sitemap queries more efficient or other troubleshooting steps that I can make to restore the ability for my sitemaps to load?

@josevarghese
Copy link
Contributor

Hi @TNHSAesop

Thanks for creating the issue. If you have a sufficient memory limit, the sitemap should load fine for 500–600 pages. Are you noticing any errors while loading it?

To help narrow down the issue, can you please check the error log (if any errors appear) and kindly inspect the browser console for any errors? Additionally, have you performed a conflict check to ensure that this isn't caused by a plugin or theme conflict?

Lastly, instead of using 250 for the sitemap entries, please try setting the entries to 100 or 200, as the entry number should be a multiple of 100.

Kindly please let us know the results.

@TNHSAesop
Copy link
Author

Hi @TNHSAesop

Thanks for creating the issue. If you have a sufficient memory limit, the sitemap should load fine for 500–600 pages. Are you noticing any errors while loading it?

To help narrow down the issue, can you please check the error log (if any errors appear) and kindly inspect the browser console for any errors? Additionally, have you performed a conflict check to ensure that this isn't caused by a plugin or theme conflict?

Lastly, instead of using 250 for the sitemap entries, please try setting the entries to 100 or 200, as the entry number should be a multiple of 100.

Kindly please let us know the results.

I ended up getting the sitemap to load by cutting down the size of my post meta table. The post meta table was roughly 1BG in size but the maximum memory per thread was around 1GB. The issue is that the entire post meta table is being queried when loading the sitemap for some reason. I had tried reducing the number of rows in the sitemap prior to cutting down the post meta and that was not helping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants