Support #21509
openQSM plugin problem
0%
Description
Via Keeping, Shiraz Biggie asks:
"I have been using the QSM plugin over the last few semesters. In the last few weeks I’ve noticed that my course site has become incredibly slow, and I think it may be related to that plugin. I was having issues with it earlier in not displaying submit buttons as well. I know they’ve done a couple of updates in the last few months and I’m wondering if that might be affecting things?
The site is https://1707casdf24.commons.gc.cuny.edu"
Updated by Boone Gorges 3 days ago
- Category name set to WordPress Plugins
- Target version set to 2.4.11
Thanks for reporting this.
quiz-master-next is indeed causing some severe performance issues on this specific site. There are two linked issues:
1. The plugin is trying to perform some database upgrade routines in a way that's extremely costly. Queries to INFORMATION_SCHEMA
are extremely costly and generally unnecessary. This is something we recently faced with a different plugin, in #20828. I've opened a ticket on the quiz-master-next repo describing the issue and proposing a strategy for fixing it: https://github.com/QuizandSurveyMaster/quiz_master_next/issues/2704
2. When the database upgrades invariably fail due to timeouts, the plugin tries to write an entry to its internal log. It uses a WP custom post type for this. But the way it inserts the post means that WordPress has to do a huge amount of work to find a unique slug. This resulted in thousands of database queries on every page load. I've described the issue in more detail and suggested a fix in https://github.com/QuizandSurveyMaster/quiz_master_next/issues/2703
For the time being, we need these issues fixed right away on the Commons. So I've made three changes:
a. Until further notice, no new sites will be able to activate quiz-master-next: https://github.com/cuny-academic-commons/cac/commit/f69bc21217f82a043e0b11090271956f3f468dd0 We can reassess if and when the plugin authors fix the problems.
b. In order to allow existing users to continue to use the plugin without crashing their site and/or the Commons, I've put a couple hotfixes in place. One short-circuits the log tool. This makes the error log useless, but it's not useful to a regular user anyway. The other one prevents quiz-master-next from performing its database upgrade routines. There's a slight chance this will introduce bugs for users, especially if a user installed the plugin a long time ago and hasn't visited the site in a while (so that many upgrades have to take place). But this is an edge case and the majority (perhaps all) of the 120+ sites using the plugin on the Commons will not be affected. https://github.com/cuny-academic-commons/cac/commit/97902f89a487d031239bdf997d5be81e5ae7bfc5
With these hotfixes pushed to the production site, the URL in question is now loading normally again. It should be possible to continue to use QSM on this site without a problem. I can't promise at this point that we'll be able to continue to offer the plugin in the future - hopefully the plugin authors will be amenable to our proposed fixes.
I'll hold this ticket open to see if we get any response to the tickets in the next few weeks.