[Plugin: Yet Another Related Posts Plugin] Running out of memory
I’m a long-time happy user of YARPP, but for the past month it’s been destroying my RSS feed.
With a PHP RAM limit of 32M, generating the RSS feed (10 items) fails with an out-of-memory error. I’m calling
related_posts()manually (with the auto-emit disabled in the plugin options).
It’s easily and consistently repeatable. When I comment out the one line of code that calls
related_posts()it works fine.
This is never a problem when it renders related posts in single-post HTML view. I’m also calling
related_posts()manually for that view.
What else I’ve tried:
- Tried increasing memory to 64M, but then after a longer CPU delay the Apache thread dies completely. I’ve tried with as much as 500M with the same effect. I don’t believe it’s actually a memory requirement but rather just something triggering the error.
- Tried previous versions of YARPP all the way up to v3.1.5. Same behavior.
- Tried executing
related_posts( array(), false )and emitting the resulting string myself rather than letting it emit directly into the stream; same behavior.
- Tried truncating the two YARPP database tables so it rebuilds the cache. Same behavior.
Please let me know what else I can do to help diagnose this problem! I self-host so I can twiddle any setting and change any file.
Thanks! I love YARPP and recommend it to others but this is critical.
I guess, you can try to disable resoure hungry features like, title and content matching. These two features can eat up your resources if you have lots of posts.
@djzone, it’s worth noting that title and content matching take advantage of MySQL fulltext search, so they are *not* the resource-intensive ones. Considering tags and categories is much more resource intensive—this is the exact opposite of your charaterization.
@asmartbear I’m very confused by your description. Are you calling
related_posts()in your theme-producing files?
related_posts()is not designed to be called manually during RSS generation… the only supported option for related posts in RSS is the “automatically display in RSS” option. Is there a reason you’re not using that? Are you still having performance issues if you don’t show related posts in RSS?
Also, clearing the cache will only make performance worse, not better. You want to build up the cache.
- The topic ‘[Plugin: Yet Another Related Posts Plugin] Running out of memory’ is closed to new replies.