Unstable connexion from remote computers

View: New views
6 Messages — Rating Filter:   Alert me  

Unstable connexion from remote computers

by max980 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everybody,

I have installed a Tomcat server to host web applications.

When using locally these applications (ie with address //localhost:8080) everything works perfectly.

But when I connect to the server with remote computers, the connexion is lost quite fast (2-3 minutes). Then it seems that if I "play" a little on the server with the applications, it reactivates the connexion and the remote computers can again access the applications....a little as if Tomcat turned into standby mode....

Does someone have an idea ?

Thanks in advance !

Re: Unstable connexion from remote computers

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Max980,

max980 wrote:
| I have installed a Tomcat server to host web applications.
|
| When using locally these applications (ie with address //localhost:8080)
| everything works perfectly.
|
| But when I connect to the server with remote computers, the connexion is
| lost quite fast (2-3 minutes). Then it seems that if I "play" a little on
| the server with the applications, it reactivates the connexion and the
| remote computers can again access the applications....a little as if
Tomcat
| turned into standby mode....

Are you using a database connection pool with a database? I wonder if
you are leaking connections and it takes the server 2-3 minutes to
abandon the connection and create another one for you.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgrPr4ACgkQ9CaO5/Lv0PCxtwCgkjqnDqCNL2D8/htMdfyxSPDN
oCUAn1CStBBvf2nFt/EJReXVWzVtUgcy
=LOrV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Unstable connexion from remote computers

by max980 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your quick answer !
No I don't use connection pooling, I instanciate a new connection for each JDBC request and then close it.

Re: Unstable connexion from remote computers

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Max980,

max980 wrote:
| Thanks for your quick answer !
| No I don't use connection pooling, I instanciate a new connection for each
| JDBC request and then close it.

During the 2-3 minute pause, generate a thread dump on the server to
find out what your threads are doing. Are you saying that you can't get
a single request to come back during those minutes?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgrQvgACgkQ9CaO5/Lv0PCBYACgrRyCncV2RhZ/M632gw64EBsp
RCkAn0Rp/bU/QQqsw0tRgHUufLe0VK+F
=C4bg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Unstable connexion from remote computers

by max980 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, during the first 2-3 minutes everything works fine. Then request don't come back from remote computers.

Here is the result of the full thread dump after these first 2-3 minutes....


Full thread dump Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing):

"http-8080-10" daemon prio=10 tid=0x08437c00 nid=0x3e67 in Object.wait() [0xb49fe000..0xb49feec0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8ca50b48> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8ca50b48> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-9" daemon prio=10 tid=0x08390800 nid=0x3e66 in Object.wait() [0xb532c000..0xb532cf40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8ca52d38> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8ca52d38> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"AWT-XAWT" daemon prio=10 tid=0x0812f800 nid=0x3e1a runnable [0xb4c7f000..0xb4c7ffc0]
   java.lang.Thread.State: RUNNABLE
        at sun.awt.X11.XToolkit.waitForEvents(Native Method)
        at sun.awt.X11.XToolkit.run(XToolkit.java:544)
        at sun.awt.X11.XToolkit.run(XToolkit.java:519)
        at java.lang.Thread.run(Thread.java:619)

"Java2D Disposer" daemon prio=10 tid=0x080a6c00 nid=0x3e19 in Object.wait() [0xb4ce6000..0xb4ce7040]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c998898> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x8c998898> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at sun.java2d.Disposer.run(Disposer.java:125)
        at java.lang.Thread.run(Thread.java:619)

"MySQL Statement Cancellation Timer" daemon prio=10 tid=0x082d3000 nid=0x3e16 in Object.wait() [0xb508b000..0xb508c0c0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c919f38> (a java.util.TaskQueue)
        at java.lang.Object.wait(Object.java:485)
        at java.util.TimerThread.mainLoop(Timer.java:483)
        - locked <0x8c919f38> (a java.util.TaskQueue)
        at java.util.TimerThread.run(Timer.java:462)

"http-8080-8" daemon prio=10 tid=0x08488400 nid=0x3c42 in Object.wait() [0xb50e3000..0xb50e4140]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c903508> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c903508> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-7" daemon prio=10 tid=0x08342800 nid=0x3c41 in Object.wait() [0xb5135000..0xb51351c0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c903590> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c903590> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-6" daemon prio=10 tid=0x08341800 nid=0x3c40 in Object.wait() [0xb5185000..0xb5185e40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c903618> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c903618> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-5" daemon prio=10 tid=0x08384400 nid=0x3c3f in Object.wait() [0xb51d6000..0xb51d6ec0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c8cb338> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c8cb338> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-4" daemon prio=10 tid=0x08383000 nid=0x3c3a in Object.wait() [0xb5227000..0xb5227f40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c8cb3c0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c8cb3c0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-3" daemon prio=10 tid=0x08487c00 nid=0x3c37 in Object.wait() [0xb5278000..0xb5278fc0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c8cb448> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c8cb448> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-2" daemon prio=10 tid=0x0839ac00 nid=0x3c34 in Object.wait() [0xb52c9000..0xb52ca040]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c8cb4d0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c8cb4d0> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-1" daemon prio=10 tid=0x0847a400 nid=0x3c2f in Object.wait() [0xb537d000..0xb537e0c0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c849de8> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:416)
        - locked <0x8c849de8> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:442)
        at java.lang.Thread.run(Thread.java:619)

"TP-Monitor" daemon prio=10 tid=0x084ac000 nid=0x3b6e in Object.wait() [0xb53cf000..0xb53cf140]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c82b988> (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
        at org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable.run(ThreadPool.java:565)
        - locked <0x8c82b988> (a org.apache.tomcat.util.threads.ThreadPool$MonitorRunnable)
        at java.lang.Thread.run(Thread.java:619)

"TP-Processor4" daemon prio=10 tid=0x08495400 nid=0x3b6d runnable [0xb541f000..0xb54201c0]
   java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
        - locked <0x8c81e098> (a java.net.SocksSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:306)
        at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:660)
        at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:870)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)

"TP-Processor3" daemon prio=10 tid=0x0845fc00 nid=0x3b6c in Object.wait() [0xb5470000..0xb5470e40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c82bbb8> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
        - locked <0x8c82bbb8> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Thread.run(Thread.java:619)

"TP-Processor2" daemon prio=10 tid=0x08497000 nid=0x3b6b in Object.wait() [0xb54c1000..0xb54c1ec0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c82bc60> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
        - locked <0x8c82bc60> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Thread.run(Thread.java:619)

"TP-Processor1" daemon prio=10 tid=0x08496800 nid=0x3b6a in Object.wait() [0xb5512000..0xb5512f40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c82bd08> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Object.wait(Object.java:485)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:662)
        - locked <0x8c82bd08> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
        at java.lang.Thread.run(Thread.java:619)

"http-8080-Acceptor-0" daemon prio=10 tid=0x0845bc00 nid=0x3b69 runnable [0xb5563000..0xb5563fc0]
   java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
        - locked <0x8c6542d0> (a java.net.SocksSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
        at java.lang.Thread.run(Thread.java:619)

"ContainerBackgroundProcessor[StandardEngine[Catalina]]" daemon prio=10 tid=0x0847d000 nid=0x3b68 waiting on condition [0xb55b4000..0xb55b5040]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
        at java.lang.Thread.sleep(Native Method)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)
        at java.lang.Thread.run(Thread.java:619)

"Low Memory Detector" daemon prio=10 tid=0x0808cc00 nid=0x3b5b runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"CompilerThread0" daemon prio=10 tid=0x0808b400 nid=0x3b5a waiting on condition [0x00000000..0xb5919c58]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x0808a000 nid=0x3b59 runnable [0x00000000..0x00000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x08081c00 nid=0x3b58 in Object.wait() [0xb5ae3000..0xb5ae3ec0]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c568550> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
        - locked <0x8c568550> (a java.lang.ref.ReferenceQueue$Lock)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=10 tid=0x08080c00 nid=0x3b57 in Object.wait() [0xb5b34000..0xb5b34f40]
   java.lang.Thread.State: WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x8c5685e0> (a java.lang.ref.Reference$Lock)
        at java.lang.Object.wait(Object.java:485)
        at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
        - locked <0x8c5685e0> (a java.lang.ref.Reference$Lock)

"main" prio=10 tid=0x08058c00 nid=0x3b55 runnable [0xb7da5000..0xb7da6298]
   java.lang.Thread.State: RUNNABLE
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
        - locked <0x8c82bd38> (a java.net.SocksSocketImpl)
        at java.net.ServerSocket.implAccept(ServerSocket.java:453)
        at java.net.ServerSocket.accept(ServerSocket.java:421)
        at org.apache.catalina.core.StandardServer.await(StandardServer.java:389)
        at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

"VM Thread" prio=10 tid=0x0807f400 nid=0x3b56 runnable

"VM Periodic Task Thread" prio=10 tid=0x0808e800 nid=0x3b5c waiting on condition

JNI global references: 1059

Heap
 def new generation   total 1024K, used 899K [0x8c060000, 0x8c170000, 0x8c540000)
  eden space 960K,  93% used [0x8c060000, 0x8c140770, 0x8c150000)
  from space 64K,   3% used [0x8c160000, 0x8c1607c0, 0x8c170000)
  to   space 64K,   0% used [0x8c150000, 0x8c150000, 0x8c160000)
 tenured generation   total 12784K, used 8596K [0x8c540000, 0x8d1bc000, 0x90060000)
   the space 12784K,  67% used [0x8c540000, 0x8cda51b8, 0x8cda5200, 0x8d1bc000)
 compacting perm gen  total 12288K, used 8413K [0x90060000, 0x90c60000, 0x94060000)
   the space 12288K,  68% used [0x90060000, 0x90897788, 0x90897800, 0x90c60000)
    ro space 8192K,  73% used [0x94060000, 0x94642560, 0x94642600, 0x94860000)
    rw space 12288K,  58% used [0x94860000, 0x94f57448, 0x94f57600, 0x95460000)

Re: Unstable connexion from remote computers

by Christopher Schultz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Max,

max980 wrote:
| No, during the first 2-3 minutes everything works fine. Then request don't
| come back from remote computers.
|
| Here is the result of the full thread dump after these first 2-3
minutes....

Weird. It looks like you have several threads that are waiting to accept
connections, so there should be no problem. Nothing appears to be
waiting on anything.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgsWT0ACgkQ9CaO5/Lv0PC8WwCcDqqySOHBS0gvhraVgGs6H5tm
HOoAn2q7Op7XAj3tNYHsf4COM8224yZk
=Rz5a
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@...
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price