Howot debug network connections from JVM?
Good morning, I could need some ideas how to debug a very specific network problem. It is not directly Tomcat related (more JVM) but maybe you have some pointers. The situation: We have an application running in Tomcat on two different servers (TomcatA, TomcatB). Both are doing HTTP calls to an application in a different network (RemoteApp). In the middle of the night the RemoteApp does not respond to our HTTP calls an we get (expected) timeouts for some minutes. This is okay so far. After RemoteApp has some CPU cycles left to answer our requests again, it becomes strange: one of the two Tomcats can communicate with RemoteApp. The other can not (still getting timeouts). This does not happen every night and it is not fixed to TomcatA or TomcatB. Last night I used tcpdump and I don't know how to interpret it: TomcatA connects to RemoteApp (SYN, SYN/ACK, ACK) and immediately closes the connection (FIN/ACK) in no time (1ms). This does not look like a timeout as reported in the logfiles and there is no HTTP request on the wire. Any ideas howto narrow this down? How can I find out who closes the connection? Candidates are the webapp, the Tomcat/JVM-Process, OS-Limits or the OS (Linux) itself? As this only happens in production debugging is not easy. Any ideas welcome, Stefan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
heap memory issues
Dear all, We have a webapp under Tomcat 5.5 and jdk 1.5 32 bits under a virtual machine of 4 Gb and a 64 bits OS. Some of you have helped me suggesting me to install Javamelody and sar to monitor the system. Setting up heap dumps I have managed to see what was going on with the eclipse memory analyzer. The webapp sends emails that have been previously entered into the database. It loads the emails into memory, so if you are sending 10k emails, it loads 10k objects containing those emails. That makes the app to use around 200-300 mb of the heap memory. The settings we have now for the JDK are: CATALINA_OPTS=$CATALINA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/tomcat5/logs/ -Xms128m -Xmx512m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails Facts that I have witnessed: If I try to increase the Xmx to 740m or 1024m the GC starts working very much and Tomcat shuts down. I have also tried downloading a 64 bits 1.7 jdk but I get the typical: Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to handler- the VM may need to be forcibly terminated It doesn't matter if i set the maxperm memory to 512m or I increase the Xms and Xmx beyond 1024m, it breaks after 5-10 minutes without doing anything. Regards, Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: heap memory issues
On 16/06/2012 12:49, Miguel González Castaños wrote: Dear all, We have a webapp under Tomcat 5.5 and jdk 1.5 32 bits under a virtual machine of 4 Gb and a 64 bits OS. Some of you have helped me suggesting me to install Javamelody and sar to monitor the system. Setting up heap dumps I have managed to see what was going on with the eclipse memory analyzer. The webapp sends emails that have been previously entered into the database. It loads the emails into memory, so if you are sending 10k emails, it loads 10k objects containing those emails. That makes the app to use around 200-300 mb of the heap memory. The settings we have now for the JDK are: CATALINA_OPTS=$CATALINA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/tomcat5/logs/ -Xms128m -Xmx512m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails Facts that I have witnessed: If I try to increase the Xmx to 740m or 1024m the GC starts working very much and Tomcat shuts down. I have also tried downloading a 64 bits 1.7 jdk but I get the typical: Java HotSpot(TM) 64-Bit Server VM warning: Exception java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to handler- the VM may need to be forcibly terminated It doesn't matter if i set the maxperm memory to 512m or I increase the Xms and Xmx beyond 1024m, it breaks after 5-10 minutes without doing anything. Also from the heap dumps I have realized that javamelody objects are consuming around 100Mb, so I have undeployed it to get at least more heap memory. Miguel - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
websockets wss:// protocol gives error...
I am able to connect from browser to tomcat using non secure WS connection: ws://127.0.0.1:8080/Myserver If I switch the connection string to secure protocol ws://127.0.0.1:8080/Myserver I get following error. Can somebody confirm if this has been implemented/known to work? I am using tomcat 7.0.27 thanks java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:128) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:926) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: websockets wss:// protocol gives error...
On 16/06/2012 20:28, Ravi wrote: I am able to connect from browser to tomcat using non secure WS connection: ws://127.0.0.1:8080/Myserver If I switch the connection string to secure protocol ws://127.0.0.1:8080/Myserver That is neither the correct protocol nor the correct port. I get following error. Can somebody confirm if this has been implemented/known to work? I am using tomcat 7.0.27 Yes, it has been implemented. Yes, it works. The current examples need a few small tweaks to get them working with the secure protocol. I'll do that shortly. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: websockets wss:// protocol gives error...
Thank you Mark for pointing out the mistake. Following url works wss://127.0.0.1:8443/Myserver On 6/16/2012 2:32 PM, Mark Thomas wrote: On 16/06/2012 20:28, Ravi wrote: I am able to connect from browser to tomcat using non secure WS connection: ws://127.0.0.1:8080/Myserver If I switch the connection string to secure protocol ws://127.0.0.1:8080/Myserver That is neither the correct protocol nor the correct port. I get following error. Can somebody confirm if this has been implemented/known to work? I am using tomcat 7.0.27 Yes, it has been implemented. Yes, it works. The current examples need a few small tweaks to get them working with the secure protocol. I'll do that shortly. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org