[LON-CAPA-admin] Long Response Times in Course Edit

Raeburn, Stuart raeburn at msu.edu
Thu Apr 11 17:50:26 EDT 2019


Mark,

>
> I have a faculty member who complains about abnormally long (for example, 20 second)
> waits when in the Course Editor.
>
> He’s using firefox and google chrome on a windows 10 laptop.
>

What does he see with Developer > Developer Tools > Network in Chrome, 
or Tools > Web Developer > Inspector > Network in Firefox for a page request which takes 20 s to complete?

>
> It is not always the case, but it happens often enough to really frustrate him
>

Can you identify a particular series of actions that cause these slow page loads by the Course Editor?  Is the user's session hosted on the library server or an access server?

In order to prevent multiple copies of the same map (i.e., a .page or .sequence file) being added to a course, certain operations (e.g., pasting items from the Course Editor clipboard) cause retrieval of an up to date list of all maps in a course.

As part of that process, a check is made to see whether the timestamp when the "bighash" for the course was last tied -- request.course.tied -- is earlier than the last modification time for the course -- internal.contentchange --  in the course's environment.db file.  If it is, then the course is re-initialized before completing the Course Editor action.

As re-initializing the course could take a few seconds, one possibility is that a change the user made using the Course Editor triggered a re-initialization of the course (for the current user session).

To test this hypothesis, if you can identify a sequence of actions that will cause a 20s wait for page load to occur you could use command line access on the session-hosting server/VM to do the following:

(a) Record the last modification time(s) for the session files in /home/httpd/perl/tmp for the particular user/course, i.e.,

<username>_<domain>_<coursenum>.db
<username>_<domain>_<coursenum>_parms.db
<username>_<domain>_<coursenum>.state

where <username> is the Course Coordinator's username and <domain>_<coursenum> is 
the courseID,

(b) Use /home/httpd/perl/debug/dump_db.pl to display the contents of the user's session file in /home/httpd/lonIDs (the file includes the username, and has an id extension), and get the value for the 'request.course.tied' key.

(c) Look in /home/httpd/lonUsers/<domain>/<1>/<2>/<3>/<coursenum>/environment.hist (where <1>,<2>, and <3> are the first three characters in the course number) for the timestamp for the recent content changes, i.e., the most recent record like:
P:<timestamp>:internal%2econtentchange=<timestamp>

Convert the timestamps found in (b) and (c) to local times, and compare the value from (b) with the last modification time for <username>_<domain>_<coursenum>_parms.db.  If they are similar, and there are times in (c) from just before that, then that would suggest that &Apache::lonuserstate::readmap() was called for the top-level map in the course.

Note: a "re-initializing" course button will be displayed on the Course Editor screen, below the table listing items in the current folder, if changes have been made to the course using the Course Editor.  Pushing that button will also change the last modification time(s) in (a), and the value for 'request.course.tied' in (b).

>
> Simple things like hiding a folder can take 20 seconds when this is acting up.
>

Unlike pasting items from the Course Editor clipboard, simply hiding a folder in the Course Editor will not prompt retrieval of an up to date list of all maps in a course.  Accordingly, it is expected to be a fast operation.


Stuart Raeburn
LON-CAPA Academic Consortium

________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Lucas, Mark <lucasm at ohio.edu>
Sent: Friday, March 29, 2019 8:26 PM
To: list about administration and system updating
Subject: [LON-CAPA-admin] Long Response Times in Course Edit

Hi,

I have a faculty member who complains about abnormally long (for example, 20 second)
waits when in the Course Editor. It is not always the case, but it happens often enough
to really frustrate him. Simple things like hiding a folder can take 20 seconds when this
is acting up.

I, on the other hand, don’t see these issues.

He’s using firefox and google chrome on a windows 10 laptop.

I understand that there can be some server side issues, but none of the rest of us
are really having issues.

Does anyone have a suggestion as to where to look? Has anyone else seen this?

Thanks for any leads,
Mark

--
Mark Lucas                                                              email: lucasm at ohio.edu
252D Clippinger Lab                                             phone: (740)597-2984
Department of Physics and Astronomy                     fax: (740)593-0433
Ohio University
Athens, OH 45701

_______________________________________________
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org


More information about the LON-CAPA-admin mailing list