Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 9503 invoked from network); 7 Jul 2010 14:21:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jul 2010 14:21:47 -0000 Received: (qmail 4430 invoked by uid 500); 7 Jul 2010 14:21:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 4209 invoked by uid 500); 7 Jul 2010 14:21:42 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 4200 invoked by uid 99); 7 Jul 2010 14:21:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:21:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jul 2010 14:21:33 +0000 Received: from [192.168.245.235] (p549EA8EF.dip0.t-ipconnect.de [84.158.168.239]) by tor.combios.es (Postfix) with ESMTPA id D6E00226158 for ; Wed, 7 Jul 2010 16:19:25 +0200 (CEST) Message-ID: <4C348D4E.2090801@ice-sa.com> Date: Wed, 07 Jul 2010 16:21:02 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Very slow HttpServletRequest.getLocalName() References: <29096652.post@talk.nabble.com> In-Reply-To: <29096652.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org mmg wrote: > Hello, > > I've recently deployed an application on our Linux staging server; a Tomcat > 5.5.28 server on Java 1.5.0_09-b01. At some point, the application makes a > call to request.getLocalName(). For some reason, this call takes a very long > time (about 20 seconds!). I profiled the application, and I see that tomcat > calls InetAddress.getHostName() in turn. This performs a reverse DNS lookup. > It's this reverse DNS lookup that takes so long (since our host doesn't have > a DNS address the resolve fails). > > Is there a way to disable this reverse DNS lookup in Tomcat or is there > anything else I can do to speed this up? > Have you tried putting a specific entry in your local /etc/hosts file, which will match what the lookup is looking for ? (what is the IP address by the way ?) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org