WordPress.org

Ready to get started?Download WordPress

Forums

Google Sitemap memory consumption (3 posts)

  1. gfindlay
    Member
    Posted 6 years ago #

    OK, I'll admit I have quite a few plugins running on my site, but I want them all.

    The problem is...Google Sitemaps is a total memory hog that I've hit a point where I just can't have it running with all the plugins I want.

    I just installed the Sitemap 3.0 plugin and the WPG2 3.0 RC Final plugin to connect to my Gallery2 install. Up to a certain point, they work perfectly together, then I activate that one extra plugin and bang WPG2 gives me blank pages for every embedded gallery url. If I deactivate Sitemap, gallery is back and I can then activate another couple of dozen plugins.

    When I have Sitemap active and generate the sitemap.xml file, it claims to use nearly 30MB of memory...that's ludicrous. If anyone has a suggestion on how to handle this or the author appears, HELP!

    And before anyone suggests adding the php "memory_limit" command to .htaccess, it won't work. My memory limit is already at 40MB and I'd have to pester my provider to get it higher, but I shouldn't have to, should I?

    Any ideas, thoughts, suggestions on how to fix this?

  2. Arnee
    Member
    Posted 6 years ago #

    Hi gfindlay,

    the version 3 of the plugin was optimized to use much less memory than every version before. Since it uses unbuffered database queries and writes the sitemap directly instead of retrieving the whole result set and caching it in variables, it is nearly impossible that it uses 30MB. I've tested the plugin on several test blogs with up to 4000 posts and it used never more than 1 or 2 MB (checked via memory_get_peak_usage).

    The other point is that the plugin is only active when you change the content of your blog (edit or create a post). All the other time the plugin is just there and does actually nothing beside registering the WordPress hooks.

    Maybe there is a problem with an other plugin which gets active when the sitemap is build. To build the sitemap, the sitemap plugin calls various WP function to generate the permalinks and query other WP stuff. At any point of these calls an other plugin could register itself for a hook to make some fancy things with the permalinks for example which could result in more DB queries and a higher memory usage.

    Could you provide a list of other plugins you're using?

    Best regards,

    Arne

  3. Arnee
    Member
    Posted 6 years ago #

    Hi,

    I've tested it again and WordPress itself without any plugin enabled uses 6.75MB at the plugin management page. Activating the sitemap plugin increases the memory usage to 7.25MB.

    Using an opcode cache like APC, the memory usage will go down to 1.75MB on the second request. Where is your site hosted? maybe you could ask your provider if he enables APC for you.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags