WeBWorK Main Forum

Navigating between problems is slow after upgrading to 2.17 from 2.15

Navigating between problems is slow after upgrading to 2.17 from 2.15

by Lukas Fredriksson -
Number of replies: 7

Hi,

I have recently upgraded my system from 2.15 to 2.17 and some of my courses are significantly slower than before. I made sure I correctly did the steps going from 2.15 to 2.16 as well.

Looking at the debug logs I find this after navigating between problems in a problem set in one of the slow courses:

[Tue Jan 24 10:56:38.645306 2023] WeBWorK::ContentGenerator::Problem::pre_header_initialize: end pg processing
[Tue Jan 24 10:56:40.959122 2023] WeBWorK::dispatch: -------------------- call to WeBWorK::ContentGenerator::Problem::go


From the start of the call up until that point is about a quarter of a second and then it takes about 2.5 seconds to complete this step (looking at the timestamp).

Are there any known issues with the new version that can cause this?

What additional information would be helpful to debug this further?


Thanks!

In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Glenn Rice -

WeBWorK 2.17 should be faster than previous releases, not slower.  One thing that slows things down in general is having debugging enabled (that is not different than any previous version).  Debugging outputs a whole lot of information for each request to the debug log.  Although, even that should not give the slow times that you give.  I don't know what would be causing the slow down that you are seeing.  Does the apache2 error log show anything?

In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Danny Glin -

Here are some generic troubleshooting steps.  I suspect you may have already tried some of these:

  • Make sure you run `npm install` in both the /opt/webwork/webwork2/htdocs and /opt/webwork/pg/htdocs directories.
  • Make sure you have restarted apache after the upgrade.
  • Check your browser error console.  It may point to something not loading properly.

Also, you mention that this is happening in "one of the slow courses".  Does that mean that it's only happening in some courses?  Do you see the same slowdown in a newly created course?

In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Lukas Fredriksson -

Apache log did not show anything, neither did the console. Debug was only turned on after reports of the site being slow came in. Apache has been restarted and npm install has been run in both of those directories.

And yes, not all courses are slow. I'll try to create a new course and see if I can make it slow somehow!


Thanks for your responses

In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Lukas Fredriksson -
Still haven't found the cause of this. We are using mysql instead of MariaDB, do you think that might cause an issue? The slow course is one of the larger one with many problem sets.
In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Glenn Rice -

I think I have found the problem.  How large is the class that this is happening for?  How many users are in the course?

Here is something that you can do that will probably fix the issue.  Comment out line 2441 of /opt/webwork/webwork2/ContentGenerator/Problem.pm.  This assumes that you are not using $courseURLs{feedbackFormURL}.  By default you would not be using that.  If that is set in localOverrides.conf, then you are.  As long as you are not using that setting, then you don't need the line I am telling you to comment out.  Note that when students click on the "Email Instructor" button the page that opens will still take a long time to open, but switching problems will be much faster.

In reply to Glenn Rice

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Lukas Fredriksson -

Amazing, that did the trick!

There are 17800 users in this course, it's a course that basically never change that students can take to prepare for higher studies in math and some people start it and continue years later so we never delete them.

In reply to Lukas Fredriksson

Re: Navigating between problems is slow after upgrading to 2.17 from 2.15

by Glenn Rice -
I have a course that has more than 40,000 users, and I see the same problem with that course. The course is a placement exam for our students, and is similar in nature with regards to users never changing.