Bug #10675

NextGEN Gallery and other tools using "Freemius" cause excessive db i/o

Added by Boone Gorges about 3 years ago. Updated about 3 years ago.

Priority name:
Category name:
Target version:
Start date:
Due date:
% Done:


Estimated time:


Spotted while examining recent performance issues: Plugins that use the Freemius library - especially NextGEN Gallery, but it also exists in some other Commons plugins - can cause excessive write queries. A backtrace is attached (the first few items are related to my debugging tools, which hook to pre_update_option_fs_accounts).

My best guess as to what's happening is that the plugin is attempting to update_option( 'fs_accounts' ) with a value that is very huge (because it contains a list of all plugins on the system). It's likely that the update routine is experiencing latency due to its huge size. It's also possible that the entries are too big for Memcached, so that they're not being properly reported as having been set. In any case, it's triggering an update on nearly every pageload on affected sites. I have a hunch that this is one of the underlying causes of ongoing performance issues.

We are not the only ones experiencing the problem. See

For the time being, I'm going to hotfix the plugin so that it does not attempt the update_option(). Then I'll spend some more time looking into more general solutions.

ngg.txt (2.62 MB) ngg.txt Boone Gorges, 2018-11-07 03:40 PM


#2 Updated by Boone Gorges about 3 years ago

  • Description updated (diff)

#3 Updated by Boone Gorges about 3 years ago

The Freemius tool seems kind of icky generally. In, I've blocked it from loading at all on nextgen-gallery.

#4 Updated by Matt Gold about 3 years ago

Interesting. Thanks, Boone, for this continuing work

#5 Updated by Boone Gorges about 3 years ago is a more permanent workaround. It forces the value stored in fs_accounts to be an empty array.

I'll leave this ticket open to assess what happens after 1.13.13.

#6 Updated by Boone Gorges about 3 years ago

  • Status changed from New to Resolved

Tentatively closing.

Also available in: Atom PDF