Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 20631 invoked from network); 3 Feb 2010 21:10:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 21:10:11 -0000 Received: (qmail 27350 invoked by uid 500); 3 Feb 2010 21:10:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 27286 invoked by uid 500); 3 Feb 2010 21:10:07 -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 27244 invoked by uid 99); 3 Feb 2010 21:10:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 21:10:07 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of georges@mhsoftware.com designates 209.169.14.178 as permitted sender) Received: from [209.169.14.178] (HELO mail.mhsoftware.com) (209.169.14.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 21:09:59 +0000 Received: from emp00 (c-76-120-104-193.hsd1.co.comcast.net [76.120.104.193]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.mhsoftware.com (Postfix) with ESMTPSA id DF19E677C4 for ; Wed, 3 Feb 2010 14:09:37 -0700 (MST) From: "George Sexton" To: "'Tomcat Users List'" References: <027c01caa11c$d2826e80$6a00a8c0@dan> <05a101caa1cb$c3ec8090$4bc581b0$@com> <0e5e01caa1d2$27cef880$6a00a8c0@dan> <01f301caa502$85563ee0$9002bca0$@com> <006d01caa50a$c0833240$6a00a8c0@dan> In-Reply-To: <006d01caa50a$c0833240$6a00a8c0@dan> Subject: RE: Tomcat dies suddenly Date: Wed, 3 Feb 2010 14:09:36 -0700 Message-ID: <020901caa515$31baea70$9530bf50$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcqlCwMty4/8XajKS8Cr7Uz2zL2t2QAChuHg Content-Language: en-us You might want to search for getHostName by itself since it's an instance method and the variable name for the object would most certainly not be InetAddress. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 > -----Original Message----- > From: Carl [mailto:carl@etrak-plus.com] > Sent: Wednesday, February 03, 2010 12:55 PM > To: Tomcat Users List > Subject: Re: Tomcat dies suddenly > > George, > > I scanned the code for 'InetAddress.getHostName' and didn't find any > instances (that is what I thought but wanted to be certain.) > > It is frustrating how it will run very well for days and then suddenly > fail > every 15 minutes. Last Friday was a 'fail every 15 minutes' day. The > only > thing that was different last Friday was it was the last day of > registration > for several organizations and, while the total number of users was > still > around 80, the amount of work they were doing was substantially more > than > usual. The only server I was using that day was a Dell T105. When I > switched back to an older server (P4 dinosaur running 32 bit 5.5 java > and an > old Tomcat), it never failed. > > On the weekend, I was load testing both the rebuilt T110 and the T105 > that > was running Friday and found that the T105 had zero swap although it > has 6GB > of memory and I don't think it ever got close to that amount used (I > also > now rebuilt that server.) At any rate, no swap could, if I understand > it, > provoke the OOM killer which would give the type of failure we were > seeing. > > The load testing showed nothing. I could overload the server, run it > out of > memory, etc. and it still behaved as expected (a little weird at times > but > never the type of failure we were seeing.) > > I have now added some java options: > > -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+PrintGCDetails - > XX:+PrintGCTimeStamps > -XX:+HeapDumpOnOutOfMemoryError - > XX:HeapDumpPath=/usr/local/tomcat/logs > > and am monitoring it on a continual basis using VisualJVM (which shows > a lot > of information but has never shown anything at the time the system > fails.) > So far, the system is running great: quick response, memory in the 300- > 400MB > range, GC working as it should, plenty of free memory in the machine > (not > close to using swap) and no dying. > > If you can think of any rock I might look under, I would like to hear > about > it. > > TIA, > > Carl > > > ----- Original Message ----- > From: "George Sexton" > To: "'Tomcat Users List'" > Sent: Wednesday, February 03, 2010 1:55 PM > Subject: RE: Tomcat dies suddenly > > > >> -----Original Message----- > >> From: Carl [mailto:carl@etrak-plus.com] > >> Sent: Saturday, January 30, 2010 10:32 AM > >> To: Tomcat Users List > >> Subject: Re: Tomcat dies suddenly > >> > >> George, > >> > >> Thanks for your reply. > >> > >> I will check that IPV6 is disabled... can't remember for certain. > >> > >> I have had the problem on both openSuse and Slackware which has lead > me > >> to > >> believe the problem is in the JVM. I guess I could try compiling > the > >> JVM > >> from source on the target machine. > > > > Are you doing any kind of reverse DNS lookup? E.G. > > InetAddress.getHostName()? > > > > I've really seen this problem more than once with Linux. On both 32- > bit > > and > > 64-bit systems. > > > > What makes it crazy is that the system might run for weeks, but then > a > > certain user can trigger the error and it will happen twice in an > hour. > > > > If the defect is in GLIBC, it would happen on both distributions. > Really, > > if > > you're using InetAddress.getHostName(), this could be a problem. > > > > > > > >> > >> I ran memTest86 for 30 hours on the first server I encountered the > >> problem > >> with (the first server with Slackware and 64 bit java that I brought > >> up) and > >> nothing showed up. I then, redid that machine with openSuse > (thought > >> the > >> problem might be Slackware) but openSuse failed as quickly. > >> > >> Thanks, > >> > >> Carl > >> > >> ----- Original Message ----- > >> From: "George Sexton" > >> To: "'Tomcat Users List'" > >> Sent: Saturday, January 30, 2010 11:46 AM > >> Subject: RE: Tomcat dies suddenly > >> > >> > >> > I've had this happen. Finally, I got a stack trace. In my case, > there > >> > appears to be a bug in GLIBC, so when a reverse IP address lookup > is > >> done > >> > AND there is an IPV6 entry, it causes a problem. > >> > > >> > The solution appeared to be disabling IPV6 since I'm not using it. > >> This is > >> > on OpenSuSE. > >> > > >> > It would be worth checking. > >> > > >> > You might also run MemTest86+ on it if you haven't already. > >> > > >> > George Sexton > >> > MH Software, Inc. > >> > http://www.mhsoftware.com/ > >> > Voice: 303 438 9585 > >> > > >> > > >> >> -----Original Message----- > >> >> From: Carl [mailto:carl@etrak-plus.com] > >> >> Sent: Friday, January 29, 2010 12:54 PM > >> >> To: Tomcat Users List > >> >> Subject: Tomcat dies suddenly > >> >> > >> >> 6-7 weeks ago, we built up some new servers and started having > >> sudden > >> >> failures... Tomcat just stops with no error message, no system > error > >> >> messages, nothing that I have been able to find so far. > >> >> > >> >> To refresh everyone's memory, this is a new server, a Dell T110 > with > >> a > >> >> Xeon 3440 processor and 4GB memory. I have turned off both the > >> turbo > >> >> mode and hyperthreading. > >> >> > >> >> The environment: > >> >> > >> >> 64 bit Slackware Linux > >> >> > >> >> java version "1.6.0_17" > >> >> Java(TM) SE Runtime Environment (build 1.6.0_17-b04) > >> >> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01, mixed mode) > >> >> > >> >> Tomcat: apache-tomcat-6.0.20 > >> >> > >> >> These are the current JAVA_OPTS="-Xms1024m -Xmx1024m - > >> XX:PermSize=368m > >> >> -XX:MaxPermSize=368m" > >> >> > >> >> I have observed the memory usage and general performance with > Java > >> >> VisualVM and have seen nothing strange. I thought I was seeing > GC > >> as > >> >> memory usage was going up and down but in fact it was mostly > people > >> >> coming onto the system and leaving it. After several hours, the > >> memory > >> >> settles to a baseline of about 375MB. Forced GC never takes it > >> below > >> >> that value and the ups and downs from the people coming onto and > >> >> leaving the system also returns it to pretty much that value. > The > >> >> maximum memory used never was above 700MB for the entire day. > >> >> > >> >> The server runs well, idling along at 2-5% load, except for a > quick > >> >> spike during GC, serving jsp's, etc. at a reasonable speed. > Without > >> >> warning and with no tracks in any log (Tomcat or system) or to > the > >> >> console, Tomcat just shuts down. I can usually simply restart it > as > >> >> the ports used by Tomcat are closed... today, I needed to run > >> >> shutdown.sh before I could run startup.sh (startup.sh gave no > errors > >> >> but would not start Tomcat until I ran shutdown.sh and that > process > >> put > >> >> nothing in the logs... this is the first time this has happened.) > >> >> > >> >> Sometimes, the system will run for a week, sometimes for only > >> several > >> >> hours, sometimes only for a few minutes. Today, it ran until > about > >> >> 1:00PM and has been down four times since then. > >> >> > >> >> The failure (Tomcat shutting down) is not always the same place > in > >> the > >> >> code (I have some debugging messages going to catalina.out.) > >> >> > >> >> Load does not seem to make a difference. > >> >> > >> >> I have tried another sever (Dell T105, AMD processor, 6GB memory) > >> and > >> >> have observed the same results. I have run memTest86 on the > T110 > >> for > >> >> about 30 hours and it showed nothing. > >> >> > >> >> I rebuilt the T110 with SUSE linux, Java 1.6.18 and Tomcat > 6.0.24... > >> it > >> >> lasted 15 minutes. I have used the same server.xml on all the > >> >> installs: > >> >> > >> >> > >> >> > >> >> > >> >> className="org.apache.catalina.core.AprLifecycleListener" > >> >> SSLEngine="on" /> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> className="org.apache.catalina.mbeans.ServerLifecycleListener" /> > >> >> > >> >> >> >> > >> > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" > >> >> /> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> type="org.apache.catalina.UserDatabase" > >> >> > >> >> description="User database that can be updated and saved" > >> >> > >> >> factory="org.apache.catalina.users.MemoryUserDatabaseFactory" > >> >> > >> >> pathname="conf/tomcat-users.xml" /> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> maxHttpHeaderSize="8192" > >> >> > >> >> maxThreads="600" minSpareThreads="25" maxSpareThreads="75" > >> >> > >> >> enableLookups="false" redirectPort="8443" scheme="http" > >> >> acceptCount="100" > >> >> > >> >> connectionTimeout="20000" disableUploadTimeout="true" /> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> maxThreads="600" minSpareThreads="25" maxSpareThreads="75" > >> >> > >> >> enableLookups="false" disableUploadTimeout="true" > >> >> > >> >> acceptCount="100" scheme="https" secure="true" > >> >> > >> >> clientAuth="false" sslProtocol="TLS" SSLEnabled="true" > >> >> > >> >> keystoreFile="/usr/local/certs/tomcat_keystore.ks" > >> >> keystorePass="jellybean"/> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> maxThreads="600" minSpareThreads="25" maxSpareThreads="75" > >> >> > >> >> enableLookups="false" disableUploadTimeout="true" > >> >> > >> >> acceptCount="100" scheme="https" secure="true" > >> >> > >> >> clientAuth="false" sslProtocol="TLS" SSLEnabled="true" > >> >> > >> >> keystoreFile="/usr/local/certs/tomcat_keystore.ks" > >> >> keystorePass="jellybean"/> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> enableLookups="false" redirectPort="443" protocol="AJP/1.3" /> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> resourceName="UserDatabase"/> > >> >> > >> >> > >> >> > >> >> >> >> > >> >> unpackWARs="true" autoDeploy="true" deployOnStartup="true" > >> >> > >> >> xmlValidation="false" xmlNamespaceAware="false"> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> When Tomcat shuts down, the memory that it was using seems to > still > >> be > >> >> held (as seen from top) but it is nowhere near the machine > physical > >> >> memory. > >> >> > >> >> The application has been running on an older server (Dell 600SC, > 32 > >> bit > >> >> Slackware, 2GB memory) for several years and, while the > application > >> >> will throw exceptions now and then, it never crashed. This lead > me > >> to > >> >> believe the problem had something to do with the 64 bit JVM but, > >> with > >> >> without seeing errors anywhere, I can't be certain and don't know > >> what > >> >> I can do about it except go back to 32 bit. > >> >> > >> >> One time, I observed the heap and permGen memory usage with > Visual > >> JVM. > >> >> It was running around 600MB before I forced a GC and 375MB > >> afterward. > >> >> Speed was good. Memory usage from top was 2.4GB. Five minutes > >> later, > >> >> Tomcat stopped leaving no tracks that I could find. The memory > >> usage > >> >> from top was around 2.4GB. The memory usage from Visual JVM was > >> still > >> >> showing 400MB+ although the Tomcat process was gone. I restarted > >> >> Tomcat (did not reboot) so Tomcat had been shutdown gracefully > >> enough > >> >> to close the ports (8080, 8443, 443.) Tomcat stayed up for less > >> than > >> >> an hour (under light load) and stopped again. The memory used > >> >> according to top was less than 3GB but I didn't get the exact > >> number. > >> >> I restarted it again (no server reboot) and it ran for the rest > of > >> the > >> >> night (light load) and top was showing 3.3GB for memory in the > >> morning. > >> >> > >> >> Anyone have any ideas how I might track this problem down? > >> >> > >> >> Thanks, > >> >> > >> >> Carl > >> > > >> > > >> > ------------------------------------------------------------------ > --- > >> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> > For additional commands, e-mail: users-help@tomcat.apache.org > >> > > >> > > >> > >> > >> -------------------------------------------------------------------- > - > >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > > For additional commands, e-mail: users-help@tomcat.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org