Re: NIO 100% CPU usage
Ronald, thread dumps contain the native ID of threads, and ps can output such IDs as well, so you can match the output together. Been there, done that. On Thu, Oct 16, 2008 at 7:16 PM, Ronald Klop [EMAIL PROTECTED]wrote: Filip, How do your top or ps commands relate to threads in the thread dump? Are there shared ids or shared names in there? I'm searching for this for some time, so am really interested in what you mean. Ronald. Op woensdag, 15 oktober 2008 om 20:22 uur schreef Tomcat Users List users@tomcat.apache.org: Subject: Re: NIO 100% CPU usage Date: Wed Oct 15 20:22:43 CEST 2008 From: Filip Hanik - Dev Lists [EMAIL PROTECTED] ok, when you reproduce it, you don't really need a profiler, you can do a top with threads on, or a ps -efL, and from those, you can look into a thread dump I've never been able to reproduce the issue, so if you have a system, or if you want to work with me, ping me offline at fhanik at apache dot org Filip Matías Rojas wrote: It's 6.0.18 -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: miércoles, 15 de octubre de 2008 07:25 p.m. To: Tomcat Users List Subject: Re: NIO 100% CPU usage what version of tomcat are you using? Filip Matías Rojas wrote: Hi Filip, Thanks for your response. I can only reproduce it on production, where we are running a Linux 2.6 Kernel with JDK 6 update 7. After a high load it is still running at 100% CPU usage (sometimes 200% or 300% taking 2 or 3 cores). Today I'll try to do some profiling to detect the exact cause, but the bug I mentioned before sound like a possible cause to me. I understand that you said that the bug is not fixed in JDK 6 update 7? It's strange because here http://java.sun.com/javase/6/webnotes/ReleaseNotes.html it says that the bug is fixed. Thanks, Matías -Original Message- From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] Sent: martes, 14 de octubre de 2008 08:16 p.m. To: Tomcat Users List Subject: Re: NIO 100% CPU usage hi Matías, I have not yet found a way to reproduce it to put in a work around so even though its not fixed in 1.5 and 1.6, we can make it work. If you want to work with me, we can make that happen, assuming you have a way to reproduce this Filip Matías Rojas wrote: Hello, I'm experiencing a problem with NIO in Tomcat, maybe related to this issue: Selector doesn't block on Selector.select(timeout) (lnx) http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6403933 I'm using JDK 6 update 7 and it seems not to be fixed, does anybody have the same problem? When in heavy load, CPU usage goes to 100% and the only way to go back to normal is restarting Tomcat. Thanks, Matías - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Houston, we have a problem.
Re: Tomcat CPU 100%
Hi, Andrea, Look at this: http://iusr.spaces.live.com/blog/cns!69F4725ED815E770!408.entry A summary of mine after resolving the same problem. It's quite clear from the thread dump to tell which thread is running into a JSP page. Cheers, Jerome On Wed, May 7, 2008 at 10:19 PM, Andrea Di Muro [EMAIL PROTECTED] wrote: Hello everyone, I have a Tomcat server with several domains configured and sometimes I can see that the tomcat process uses 100-190% (dual processor) and hangs up. I think that one of my customer has uploaded a jsp page that makes an infinite loop. How can I check which page causes the problem? Thank you Andrea Di Muro Technical Developer [EMAIL PROTECTED] Headquarter: Viale dei Mille, 111 - 50131 Firenze Telefono +39 055 40 89 084 Siena: Via Senese 155 - 53036 Poggibonsi Telefono +39 0577 985 562 - Fax +39 0577 991 591 http://www.virtualcom.it Informativa Privacy (ex D.lgs 196/03) Le informazioni contenute nel presente documento e relativi allegati possono essere riservate e sono destinate esclusivamente alla persona od alla Società indicata come destinatario. La diffusione e la distribuzione del presente documento a soggetti diversi da quelli indicati, od in generale qualsivoglia utilizzo illecito dei dati ivi contenuti, è proibita sia ai sensi dell'art. 616 del Codice Penale che dal D. Lgs 196/03 in materia di protezione dei dati personali (Privacy). Se avete ricevuto per errore questo documento siete pregati di distruggerlo e di comunicarcelo prontamente tramite e-mail o fax. -- Houston, we have a problem.
Re: 100% cpu usage by VM Thread in tomcat
Hi, Lindsay, Sorry for my ignorance, but seeing that you were trying to locate the thread using PID, I think perhaps it's wrong. I have the same experience identifying such a CPU utilization issue on a Debian box using a 2.6.x version kernel. I cannot recall whether on a 2.4.x kernal linux box you can use ps to see TID, the native thread id. Well, maybe you can refer to http://iusr.spaces.live.com/blog/cns!69F4725ED815E770!408.entry , this is a summary after I resolving the same problem. Hope it can help. On 9/22/07, Lindsay Patten [EMAIL PROTECTED] wrote: I am looking for information on how to debug a problem. Any pointers to documentation, suggestions of approaches etc. would be much appreciated. I am having a problem with my tomcat server periodically going into a state where it is using up all the available cpu and providing very slow response. None of the jsp or servlets on the site should take up a lot of cpu, they all just do relatively simple database queries and produce simple html pages from the results. During the times when the cpu is busy the database will generally not be under any significant load. Top shows process 324 (0x144) as the busy process, and ps shows it having consumed a lot of cpu: PID TTY STAT TIME COMMAND 324 ?S837:41 /usr/java/jdk1.5.0_10/bin/java -Djava... Expecting to find that I had some error in my webapp I did a few thread dumps, but assuming that nid in the thread dump corresponds to pid from ps I found that the process that was spinning was VM Thread: VM Thread prio=1 tid=0x08098a48 nid=0x144 runnable The thread dump does not give any additional information about this thread. I presume it is the Virtual Machine itself. If I look at the system status using the Tomcat manager webapp there are often requests listed with ridiculously large values in the Time column, several hundred seconds for jsp pages that only take a fraction of a second to generate, and I can cut an paste the request into my browser and the request will finish in a fraction of a second. Sometimes it seems that reloading some of the webapps can fix the problem, at least for a while - I don't know for sure, it could be coincidence, but if I don't do anything the problem can persist for long periods of time and then go away after a few webapp reloads. I have tried to detect a pattern about which app reload solves the problem but it seems to be different different times. vmstat doesn't show the machine as thrashing or using much IO (everything basically fits into physical memory). The only thing I can think of is that the VM is going into a marathon garbage collection phase, but I don't know how to test that hypothesis, and it seems odd that even that could go on for lengthy periods of time. Help?!? JVM: jdk1.5.0_10 Tomcat: apache-tomcat-6.0.13 uname -a: Linux [hostname here] 2.4.34-grsec #27 SMP Mon Jan 22 21:19:29 CST 2007 i686 unknown The system is a two cpu system with 4GB RAM, and when not in this spinning state it handles its load with 10-15% cpu load. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Houston, we have a problem. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Auto Reload Features by Tomcat
I think it's because that you just enabled the Auto Build feature of eclipse, so every time you changed your java source, eclipse built it for you, and tomcat saw the class files changed and then reloaded that context. But when you metioned for my production, I guess that machine do not have an eclipse and you just replaced the java source without compiling it to /WEB-INF/classes and thus tomcat won't reload your context. Did I get it? 2006/6/2, ks.foong [EMAIL PROTECTED]: Hi, I notice that starting from Tomcat 5 onwards; we can enjoy the benefit of the Auto-reload features of it. I personally have tried it with my Eclipse development. Each time I have changed any servlet coding, the eclipse (or more specific, Tomcat) able to detect the changes and Reload for itself. But for my production, I am not sure how this is work. I have replaced my servlet, ProfileServlet.java to the [CATALINA_HOME]/webapps/project/WEB-INF/src/com/servlet folder. I login into my system; I didn't see any changes at all. So, any ideas how can is this reload features work in production machine? Do I need to issues any command for this? - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get process/threads dump when running tomcat in console
maybe you can try antiJARLocking and antiResourceLocking, though they only *SOMETIMES* worked for me :S 2006/5/27, Mike Klein [EMAIL PROTECTED]: I have a webapp with some problem libraries (FreeTTS...speechSynth) that aren't freeing up when I call deallocate methods on synthesizer. As a result, I cannot programmatically undeploy/redeploy webapp without tomcat getting mangledend result is jars under web-inf/lib are still there after undeploy. How can I get thread dump via Ctrl-Break as normally in Java? I need to see who's still hanging around in memory. thanks much... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: looking for TOMCAT monitor
Seems no such *FREE* tools. I'm using Lambda Probe, http://lambdaprobe.org/ , handy tool. 2006/5/28, Xuekun Hu [EMAIL PROTECTED]: Hi, I'm a newbie of TOMCAT. Is there a easy use and easy install TOMCAT monitor tool available? I just want to monitor some basic performance counters, like average reponse time, busy threads ... Thanks in advance. Thx, Xuekun - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm a newbie
I think eclipse was just unable to validate that xml file, it's likely the DTD file cannot be fetched by eclipse for some reason, e.g., network problems, DNS resolving failed. It's not a tomcat related issue. 2006/5/24, [EMAIL PROTECTED] [EMAIL PROTECTED]: I created a dynamic web project in Eclipse. I created a file and named it struts-config.xml and copy the contents from struts-blank WEB-INF/struts-config.xml and did a cut and paste into my project. The error message I receive is the file cannot be validated because there was a communication problem. This happens whenever I compile and I have not made any change to the file. I don't think I can import it...Can someone shed some insight. Carrie Latimer Florida's Turnpike Enterprise Tolls Data Center Main 561.488.5361 SC 247.5361 Fax 561.470.6615 Mobile: 561.239.6189 Nextel: 158*763*109 [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Object sharing
Well, I think -Xnoclassgc is horrible. And singleton objects cannot be shared among different application contexts, because they use different classloaders. Shared objects is better held in somewhere else, e.g., JNDI, although I usually blame it =) 2006/5/22, Corobitsyn Roman [EMAIL PROTECTED]: Hi Sharing is possible with Tomcat You must put your objects in shared classloader For example: public class ObjectPool { private static ObjectPool objectPool = null; private ObjectPool { // initialize object } public synchronized static ObjectPool getInstance() { if (objectPool == null) { objectPool = new ObjectPool(); } return objectPool; } } And then put jar or compiled class into shared/lib or shared/classes But prevent garbage collection, you must use the -Xnoclassgc start-up parameter. (set JAVA_OPTS=-Xnoclassgc) Other solution is adding the following member to a class that is always loaded in an application: private ObjectPool objectPool = ObjectPool.getInstance(); I hope this helps BG Arvind BG By design I would use an EJB, this way you can also use BG proper security to comtrol access to your bean. You can access the BG EJB from any webapps, wether it runs or not on the same server. BG And you can also expose it as a web service. BG Using JBoss you will have tomcat out of the box as well as BG transaction, security, etc And no license cost. BG Hopes this helps. BG Bruno Georges BG Glencore International AG BG Tel. +41 41 709 3204 BG Fax +41 41 709 3000 BG - Original Message - BG From: Arvind S. [EMAIL PROTECTED] BG Sent: 19.05.2006 21:25 BG To: users@tomcat.apache.org BG Subject: Object sharing BG Hi, BG If a web application wants to access a object being used by another BG web-application(with a different context root) running on the same BG webserver, is that possible? BG If yes, how can it be achieved?Through sharing attributes of ServletContext? BG Will getting an attribute from the servletContext, return a copy of the BG object or the reference itself? BG Thanks Regards BG LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly BG confidential and they may not be used or disclosed by someone who is not a BG named recipient. BG If you have received this email in error please notify the sender by replying BG to this email inserting the word misdirected as the message and delete this BG e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Object sharing
Oh I'm terribly sorry I miss the line you said into shared/lib or shared/classes. Forget that =P 2006/5/22, Corobitsyn Roman [EMAIL PROTECTED]: Hi Sharing is possible with Tomcat You must put your objects in shared classloader For example: public class ObjectPool { private static ObjectPool objectPool = null; private ObjectPool { // initialize object } public synchronized static ObjectPool getInstance() { if (objectPool == null) { objectPool = new ObjectPool(); } return objectPool; } } And then put jar or compiled class into shared/lib or shared/classes But prevent garbage collection, you must use the -Xnoclassgc start-up parameter. (set JAVA_OPTS=-Xnoclassgc) Other solution is adding the following member to a class that is always loaded in an application: private ObjectPool objectPool = ObjectPool.getInstance(); I hope this helps BG Arvind BG By design I would use an EJB, this way you can also use BG proper security to comtrol access to your bean. You can access the BG EJB from any webapps, wether it runs or not on the same server. BG And you can also expose it as a web service. BG Using JBoss you will have tomcat out of the box as well as BG transaction, security, etc And no license cost. BG Hopes this helps. BG Bruno Georges BG Glencore International AG BG Tel. +41 41 709 3204 BG Fax +41 41 709 3000 BG - Original Message - BG From: Arvind S. [EMAIL PROTECTED] BG Sent: 19.05.2006 21:25 BG To: users@tomcat.apache.org BG Subject: Object sharing BG Hi, BG If a web application wants to access a object being used by another BG web-application(with a different context root) running on the same BG webserver, is that possible? BG If yes, how can it be achieved?Through sharing attributes of ServletContext? BG Will getting an attribute from the servletContext, return a copy of the BG object or the reference itself? BG Thanks Regards BG LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly BG confidential and they may not be used or disclosed by someone who is not a BG named recipient. BG If you have received this email in error please notify the sender by replying BG to this email inserting the word misdirected as the message and delete this BG e-mail from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]