Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DB0B10AF1 for ; Tue, 22 Oct 2013 23:43:29 +0000 (UTC) Received: (qmail 61388 invoked by uid 500); 22 Oct 2013 23:43:26 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 61266 invoked by uid 500); 22 Oct 2013 23:43:26 -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 61257 invoked by uid 99); 22 Oct 2013 23:43:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Oct 2013 23:43:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.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; Tue, 22 Oct 2013 23:43:20 +0000 Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 184623C0424 for ; Wed, 23 Oct 2013 01:43:22 +0200 (CEST) Message-ID: <52670D7D.5080108@ice-sa.com> Date: Wed, 23 Oct 2013 01:42:53 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Servlet init method called multiple times References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Richard Pierce wrote: > The init() method of all of my servlets is being called every 10 seconds or so. I verified this by adding a System.out to the init() methods of my servlets. However, the server is not restarting- just init gets recalled, even with no load on the box at all. I have no idea where to begin debugging this, but it does appear to be affecting performance. > > The API states "The servlet container calls the init method exactly once after instantiating the servlet." > > I added an instance and static variable to the servlet, to see whether the init method was being called multiple times on the same instance or if new instances were being created. > > Initialized: 1 times (local), 28 total (static); Thead=http-127.0.0.1-51443-1 Time: Tue Oct 22 18:40:36 EDT 2013 > Initialized: 1 times (local), 29 total (static); Thead=http-127.0.0.1-51443-1 Time: Tue Oct 22 18:40:41 EDT 2013 > Initialized: 1 times (local), 30 total (static); Thead=http-127.0.0.1-51443-1 Time: Tue Oct 22 18:40:46 EDT 2013 > Initialized: 1 times (local), 31 total (static); Thead=http-127.0.0.1-51443-1 Time: Tue Oct 22 18:40:51 EDT 2013 > > Obviously it is happening every 5 seconds, but WHAT is happening? > > > Tomcat version: Apache Tomcat/6.0.35 > OS: Linux version 2.6.18-194.11.3.el5 > Hi. 1) anything noteworthy mentioned in the Tomcat logs ? 2) can you paste your conf/server.xml here ? (confidential info removed) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org