Project

General

Profile

Actions

Bug #10675

closed

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

Added by Boone Gorges almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
-
Target version:
Start date:
2018-11-07
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Spotted while examining recent performance issues: Plugins that use the Freemius library https://github.com/Freemius/wordpress-sdk - 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 https://github.com/Freemius/wordpress-sdk/issues/260

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.


Files

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

Updated by Boone Gorges almost 6 years ago

  • Description updated (diff)
Actions #3

Updated by Boone Gorges almost 6 years ago

The Freemius tool seems kind of icky generally. In https://github.com/cuny-academic-commons/cac/commit/3a8add2802f596b125e06c957b5402ab66b9788a, I've blocked it from loading at all on nextgen-gallery.

Actions #4

Updated by Matt Gold almost 6 years ago

Interesting. Thanks, Boone, for this continuing work

Actions #5

Updated by Boone Gorges almost 6 years ago

https://github.com/cuny-academic-commons/cac/commit/c9d582f4009ae8840dd48918b9f038725d3bf048 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.

Actions #6

Updated by Boone Gorges almost 6 years ago

  • Status changed from New to Resolved

Tentatively closing.

Actions

Also available in: Atom PDF