[LON-CAPA-admin] httpd: Unit:: messages in /var/log/messages

Raeburn, Stuart raeburn at msu.edu
Sun Sep 12 18:26:51 EDT 2021


Todd,

The login page on your LON-CAPA server at around 5:00 pm ET today (Sept 12) showed:

Server Load:  	 205.6 percent
User Load:  	 10.90 percent

and at 5:10 pm ET today (Sept 12) it showed:

Server Load:  	 99.5 percent
User Load:  	 11.00 percent

The calculation of $loadpercent, i.e., Server Load (as a percentage) is:

    my $loadavg;
    {
        my $loadfile=Apache::File->new('/proc/loadavg');
        $loadavg=<$loadfile>;
    }
    $loadavg =~ s/\s.*//g;

    my ($loadpercent);
    if ($loadlim) {
        $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim);
    }

where $loadlim is the value for the lonLoadLim in /etc/httpd/conf/loncapa.conf

If your library server is not actually overloaded, then you could either (a) raise the value of lonLoadLim, or (b) set the value of lonLoadLim to 0, in /etc/httpd/conf/loncapa.conf, followed by a reload of the web server.

For a LON-CAPA server which is part of a cluster of LON-CAPA nodes then when LON-CAPA determines a server is at over 100% server load, then after a user authenticates via /adm/login it will switch the user's session to the least loaded available LON-CAPA host listed in the domain configuration for that server.

If your domain runs LON-CAPA as a single (standalone) server then that type of offloading of user sessions from an "overloaded" LON-CAPA server will be unavailable in your LON-CAPA domain.

As regards items such as:

Sep 12 14:23:14 loncapa01 httpd: Unit::[m] = 1 * (1*m^1) (1*s^-2)

in /var/log/messages my guess would be that they originate within capa.so

If I look in the CAPA source code I find
source.loncapa.org/cgi-bin/cvsweb.cgi/capa/capa51/pProj/capaUnit.c

has this line within print_unit_t(Unit_t *t)
printf("  Unit::[%s] = %g * ", t->u_symbol, t->u_scale);

and print_unit_t( is called by this line in postorder_utree() 
case U_DERIVED:   print_unit_t(node_p);

A question I have is: did you see similar entries in /var/log/messages when running 2.11.2?

The only change I see in the code  between 2.11.2 and 2.11.3 for the CAPA engine, which (among other things) performs physical unit checking, is a minor change in capaParserUtils.c to address bug 6900

See:
source.loncapa.org/cgi-bin/cvsweb.cgi/capa/capa51/pProj/capaParserUtils.c.diff?r1=1.20;r2=1.21

Stuart Raeburn
LON-CAPA Academic Consortium
________________________________________
From: LON-CAPA-admin <lon-capa-admin-bounces at mail.lon-capa.org> on behalf of Todd Pfaff via LON-CAPA-admin <lon-capa-admin at mail.lon-capa.org>
Sent: Sunday, September 12, 2021 4:02 PM
To: lon-capa-admin at mail.lon-capa.org
Subject: [LON-CAPA-admin] httpd: Unit:: messages in /var/log/messages

We're running LON-CAPA 2.11.3-2021031720 on CentOS 7.  We recently
upgraded from 2.11.2 to 2.11.3 and are starting to see heavy use again
with the new school term.

We seem to be experiencing some load related problems after the 2.11.3
upgrade that I don't recall us having last year with 2.11.2.  When this is
happening I am unable to login as Domain Coordinator and monitor Status
Information.

Other than the 2.11.3 upgrade, and installing all other outstanding CentOS
7 updates, nothing has intentionally changed with this LON-CAPA server.

While doing some initial diagnosis of this performance problem, I happened
to notice that messages like the following are regularly being written to
/var/log/messages on our LON-CAPA server.

Sep 12 14:23:14 loncapa01 httpd: Unit::[m] = 1 * (1*m^1) (1*s^-2)
Sep 12 14:23:16 loncapa01 httpd: Unit::[cm] = 0.0001 * (1*m^2)
Sep 12 14:23:19 loncapa01 httpd: Unit::[deg] = 0.0174533 *
Sep 12 14:23:19 loncapa01 httpd: Unit::[kg] = 1 * (1*m^-3) (1*kg^1)

I have no idea if this is related to our performance problem, or if it is
some other insignificant problem, but it is unusual and not something I
would expect to be finding, neither from httpd nor in /var/log/messages.
If for no other reason, I'd like to eliminate thes messages since they're
just log noise consuming disk space.

Any ideas?

Thanks,
Todd
_______________________________________________
LON-CAPA-admin mailing list
LON-CAPA-admin at mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-admin


More information about the LON-CAPA-admin mailing list