[LON-CAPA-admin] Some pages of loncapa 2.1 take forever

Guy Albertelli II guy at albertelli.com
Tue Jan 3 14:08:26 EST 2006


Hi Hon-Kie,

> It is only on the new library server (the old lib server is now an 
> access server). I rebooted the system and it seems to hang on httpd. 

Lon-CAPA does the DNS lookup on all of the hostnames in hosts.tab at
webserver startup (and lonc/d startup)

This can cause a noticable delay at startup if DNS queries are slow.


You can use this script to see which names are taking forever:

use IO::Socket;
$|=1;
open(CONF,"/home/httpd/lonTabs/hosts.tab");
while (my $configline=<CONF>) {
    next if ($configline =~ /^(\#|\s*$)/);
    chomp($configline);
    my ($id,$domain,$role,$name)=split(/:/,$configline);
    print("Getting IP for $name ");
    $ip = gethostbyname($name);
    if (!$ip || length($ip) ne 4) {
        print("no IP \n");
    } else {
        $ip=inet_ntoa($ip);
        print("got $ip \n");
    }
}

> It says something about use of uninitialized value in line 26 of 
> Cookie.pm.

Ignore this.

> It has always been slow to start the httpd but now I 
> cannot get any response.
> 
> I will send the ps output if the system boots up properly.

-- 
guy at albertelli.com   0-7-1-8-27,137



More information about the LON-CAPA-admin mailing list