Project

General

Profile

Actions

Support #21509

closed

QSM plugin problem

Added by Marilyn Weber about 1 month ago. Updated 10 days ago.

Status:
Resolved
Priority name:
Normal
Assignee:
-
Category name:
WordPress Plugins
Target version:
Start date:
2024-11-18
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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"

Actions #1

Updated by Boone Gorges about 1 month ago

  • Category name set to WordPress Plugins
  • Target version set to 601

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.

Actions #2

Updated by Matt Gold about 1 month ago

Wow -- amazing work, Boone -- you are doing such a service by writing out those suggestions for the plugin creator in such a helpful way. Here's hoping they take your advice.

Actions #3

Updated by Boone Gorges about 1 month ago

  • Status changed from New to Resolved

I got a polite but ultimately dismissive response from the plugin author: https://github.com/QuizandSurveyMaster/quiz_master_next/issues/2704#issuecomment-2498030638 I don't expect that they'll make any changes to the plugin, though perhaps they'll take my advice when they introduce new upgrade routines.

I think this means we have to continue to prevent the plugin from performing its updates, which means we have to continue to leave it disabled for future use.

Actions #4

Updated by Boone Gorges 10 days ago

  • Target version changed from 601 to 2.5.0
Actions

Also available in: Atom PDF