You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Kwirirai <kw...@designat7.co.zw> on 2003/01/13 08:12:26 UTC
DNS Lookups taking too long
Hi Guys
I have recently tested out the time it takes to do DNS lookups for James
2.1 release ,
what I have released it seems to be taking too long for MX record
lookups to be done.
On average estimate, it takes about two minutes to do the lookups .
Is there a way that these lookups can be tuned so that the lookups can
take a much shorter time,
or does this depend on the network one is using to the lookups ,
or there is some configuration that needs to be done to make it go fast.
I have used nslookup from windows 2000 to lookup records on the same
machine running James and also querying the same Name Server
and it is fast on giving back the records (just a few seconds).
thanks
Kwirirai Nhakwi
Re: DNS Lookups taking too long
Posted by Serge Sozonoff <se...@globalbeach.com>.
Hi Aaron,
Small correction.
Actually , James caches DNS lookups as well :-)
Serge
----- Original Message -----
From: "Aaron Knauf" <ak...@xtra.co.nz>
To: "James Developers List" <ja...@jakarta.apache.org>
Sent: Wednesday, January 15, 2003 9:58 AM
Subject: Re: DNS Lookups taking too long
>
>
> Kwirirai wrote:
> > Hi Guys
> > I have recently tested out the time it takes to do DNS lookups for James
> > 2.1 release ,
> > what I have released it seems to be taking too long for MX record
> > lookups to be done.
> > On average estimate, it takes about two minutes to do the lookups .
> > Is there a way that these lookups can be tuned so that the lookups can
> > take a much shorter time,
> > or does this depend on the network one is using to the lookups ,
> > or there is some configuration that needs to be done to make it go fast.
> > I have used nslookup from windows 2000 to lookup records on the same
> > machine running James
>
> Win2K caches it's DNS lookups. AFAIK JAMES doesn't. This would tend to
> invalidate the comparison unless care was taken to ensure that the cache
> was emptied by restarting the Win2K DNS client service.
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DNS Lookups taking too long
Posted by Aaron Knauf <ak...@xtra.co.nz>.
Kwirirai wrote:
> Hi Guys
> I have recently tested out the time it takes to do DNS lookups for James
> 2.1 release ,
> what I have released it seems to be taking too long for MX record
> lookups to be done.
> On average estimate, it takes about two minutes to do the lookups .
> Is there a way that these lookups can be tuned so that the lookups can
> take a much shorter time,
> or does this depend on the network one is using to the lookups ,
> or there is some configuration that needs to be done to make it go fast.
> I have used nslookup from windows 2000 to lookup records on the same
> machine running James
Win2K caches it's DNS lookups. AFAIK JAMES doesn't. This would tend to
invalidate the comparison unless care was taken to ensure that the cache
was emptied by restarting the Win2K DNS client service.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: DNS Lookups taking too long
Posted by Kwirirai <kw...@designat7.co.zw>.
Thanks Serge your are dead right!
I cannot believe it! I was really making the mistake of adding the IP of
the machine as one of the DNS Servers ,that's why it was taking too
long, as to why I did this I a have no idea, this is one big mistake I
had all the time and failed to notice it .
Its working fine , instantly doing lookups.
Kwirirai Nhakwi
-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Monday, January 13, 2003 4:25 PM
To: James Developers List
Subject: Re: DNS Lookups taking too long
Kwirirai wrote:
> Hi
> This is a simple test I did , I just had to stick in start time and
end
> time in Remote Delivery Mailet between the code that does the lookup.
> Its just a simple test but its really showing me what I am failing to
> understand. I actually noticed this when I sent mailing list with
about
> 300 emails and it took about one and half days to clear up the mail in
> the spool.
> Is it because I am using J2sdk1.4.1 on windows 2000 ,
> because if doing lookups manually using nslookup (windows 2000) is
that
> fast, I don't think it is the network.
I'm betting you didn't configure your DNS servers in James, and the
query is timing out. Ordinarily a DNS server shouldn't take more than a
few seconds to respond, so the only way I could see it taking this long
is if your DNS servers are not or are misconfigured in james-config.xml.
--
Serge Knystautas
Loki Technologies
http://www.lokitech.com
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DNS Lookups taking too long
Posted by Serge Knystautas <se...@lokitech.com>.
Kwirirai wrote:
> Hi
> This is a simple test I did , I just had to stick in start time and end
> time in Remote Delivery Mailet between the code that does the lookup.
> Its just a simple test but its really showing me what I am failing to
> understand. I actually noticed this when I sent mailing list with about
> 300 emails and it took about one and half days to clear up the mail in
> the spool.
> Is it because I am using J2sdk1.4.1 on windows 2000 ,
> because if doing lookups manually using nslookup (windows 2000) is that
> fast, I don't think it is the network.
I'm betting you didn't configure your DNS servers in James, and the
query is timing out. Ordinarily a DNS server shouldn't take more than a
few seconds to respond, so the only way I could see it taking this long
is if your DNS servers are not or are misconfigured in james-config.xml.
--
Serge Knystautas
Loki Technologies
http://www.lokitech.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: DNS Lookups taking too long
Posted by Danny Angus <da...@apache.org>.
> Is it because I am using J2sdk1.4.1 on windows 2000 ,
> because if doing lookups manually using nslookup (windows 2000) is that
> fast, I don't think it is the network.
It isn't that.
> Could you tell me what Platform you are using eg. Operating system, and
> JVM version may it could help.
Linux redhat7.2, sun j2sdk1.4.1
windows2000 pro, sun j2sdk1.4.1
Both systems run James OK, its not that.
d.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: DNS Lookups taking too long
Posted by Kwirirai <kw...@designat7.co.zw>.
Hi
This is a simple test I did , I just had to stick in start time and end
time in Remote Delivery Mailet between the code that does the lookup.
Its just a simple test but its really showing me what I am failing to
understand. I actually noticed this when I sent mailing list with about
300 emails and it took about one and half days to clear up the mail in
the spool.
Is it because I am using J2sdk1.4.1 on windows 2000 ,
because if doing lookups manually using nslookup (windows 2000) is that
fast, I don't think it is the network.
Could you tell me what Platform you are using eg. Operating system, and
JVM version may it could help.
Here is the code in RemoteDelivery Mailet
private boolean deliver(MailImpl mail, Session session) {
.....
//Lookup the possible targets
startTime=System.currentTimeMillis();
targetServers = getMailetContext().getMailServers(host);
endTime=System.currentTimeMillis();
System.out.println("Time Taken to look up
hostname:"+host+"is=" + (endTime-startTime)/1000);
...............
}
it just prints out the time taken to execute that piece of code ,it's a
clumsy way to find out ,or maybe it's the wrong way !
Thanks
kwiri
-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Monday, January 13, 2003 3:17 PM
To: James Developers List
Subject: Re: DNS Lookups taking too long
Kwirirai wrote:
> Hi Guys
> I have recently tested out the time it takes to do DNS lookups for
James
> 2.1 release ,
> what I have released it seems to be taking too long for MX record
> lookups to be done.
> On average estimate, it takes about two minutes to do the lookups .
> Is there a way that these lookups can be tuned so that the lookups can
> take a much shorter time,
> or does this depend on the network one is using to the lookups ,
> or there is some configuration that needs to be done to make it go
fast.
> I have used nslookup from windows 2000 to lookup records on the same
> machine running James and also querying the same Name Server
> and it is fast on giving back the records (just a few seconds).
Can I ask how you were doing the tests? I've never seen James take that
long for lookups, so I have to think it's a problem with your network or
DNS servers.
--
Serge Knystautas
Loki Technologies
http://www.lokitech.com
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: DNS Lookups taking too long
Posted by Serge Knystautas <se...@lokitech.com>.
Kwirirai wrote:
> Hi Guys
> I have recently tested out the time it takes to do DNS lookups for James
> 2.1 release ,
> what I have released it seems to be taking too long for MX record
> lookups to be done.
> On average estimate, it takes about two minutes to do the lookups .
> Is there a way that these lookups can be tuned so that the lookups can
> take a much shorter time,
> or does this depend on the network one is using to the lookups ,
> or there is some configuration that needs to be done to make it go fast.
> I have used nslookup from windows 2000 to lookup records on the same
> machine running James and also querying the same Name Server
> and it is fast on giving back the records (just a few seconds).
Can I ask how you were doing the tests? I've never seen James take that
long for lookups, so I have to think it's a problem with your network or
DNS servers.
--
Serge Knystautas
Loki Technologies
http://www.lokitech.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>