• NextGen/Imagely (v 4.1.1) is suddenly causing huge spikes in load ave on server. It’s paralyzing our site. As soon as we disable it, the load ave goes back to normal. Activate it again, and it spikes way, way up. Our WordPress is the latest version.

    Technical Evidence:

    1. Slow Log Trace: Our php-fpm/www-slow.log consistently flags NextGEN during the wp_enqueue_scripts and template_redirect hooks.
      • Offending Functions: NextGEN_Gallery\DataMappers\DisplayType::run_query() and NextGEN_Gallery\DataMapper\WPPostDriver::query().
      • The Bottleneck: It appears the mysqli_query calls inside the DataMapper are taking excessive time, even on pages where no gallery is present.
    2. FPM Status Trace:
      • NextGEN_Gallery\Display\DisplayManager::enqueue_frontend_resources() is frequently at the top of the stack during load spikes.
      • This suggests the Resource Manager is performing heavy database lookups on every single page load to determine which assets to inject.
    3. Environment Details:
      • PHP version: [8.4]
      • Object Cache: Redis is active (object-cache.php is present), but NextGEN’s internal queries do not seem to be hitting the cache efficiently.
      • Theme: GeneratePress.

    Our database tables are small (e.g., ngg_pictures is only 25MB), yet the slow log shows run_query() and find_by_name() taking several seconds to complete. This suggests a PHP-level bottleneck or an inefficient loop in the DataMappers\DisplayType class rather than a slow MySQL query.

    We have several large galleries with 2,000–3,000 images each. The slow.log shows the bottleneck is in DataMappers\DisplayType and WPPostDriver. It appears the plugin is attempting to load/map the entire gallery metadata into memory on every page load, rather than using pagination or lazy-loading at the database level.

    Questions:

    • Is there a way to prevent the Resource Manager from scanning the database on every request for pages that do not contain a [ngg] shortcode or block?
    • Why are find_by_name() and run_query() in the DisplayType mapper taking 5+ seconds to execute on a high-spec dedicated server?
    • Are there specific global settings we should disable to stop NextGEN from hooking into wp_enqueue_scripts so aggressively?
    • This topic was modified 3 weeks, 5 days ago by jamminjames.
    • This topic was modified 3 weeks, 5 days ago by jamminjames.
    • This topic was modified 3 weeks, 5 days ago by jamminjames.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jamminjames

    (@jamminjames)

    This is a major problem and should be looked into immediately. Any response? Thanks!

    Thread Starter jamminjames

    (@jamminjames)

    Can I get any kind of response from the plugin authors? We cannot activate this plugin as it is.

    Thread Starter jamminjames

    (@jamminjames)

    I went to the archives page and downloaded Nextgen v4.0.5, and it seems to be working again. I deactivated and deleted the plugin from the plugins list on the backend, then uploaded the plugin via the upload option for installing. I didn’t delete the plugin folder first from the server, and I guess due to that, the plugin list shows it as the new version (4.1.1), but I think the files are from the older version, as the plugin is working now without the problems we were experiencing before.

    Still, I think Imagely needs to look into this issue and upload an update asap.

    • This reply was modified 2 weeks, 2 days ago by jamminjames. Reason: added archives link
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.