db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Using NetworkServerControl to access in-memory (only) tables of Embedded Derby
Date Fri, 05 Feb 2010 17:07:20 GMT
> DerbyServer thread seems to still be running, yet the server is 
> unresponsive.

In addition to your own DerbyServer thread, which I don't think
actually *needs* to still be running, there should be a separate
thread which is started by the Derby network server code itself,
which has the job of accepting connections and delivering them
to other threads to be processed.

In my running network server, for example, when I look at the
threads that are active, I see:

"NetworkServerThread_2" prio=6 tid=0x03044c80 nid=0x27c runnable [0x033cf000..0x033cfae8]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
         - locked <0x22a857d8> (a java.net.SocksSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:450)
         at java.net.ServerSocket.accept(ServerSocket.java:421)
         at org.apache.derby.impl.drda.ClientThread$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.derby.impl.drda.ClientThread.run(Unknown Source)

Do you see a thread like that?

When your server becomes stuck/wedged/unresponsive, why don't you try this:
  - collect a thread dump of the entire JVM
  - look through the threads for any which mention "org.apache.derby" in their stacks
  - edit out all the other threads from your thread dump

Then post a message with a cut-and-paste of just the derby-related threads
in your wedged server, and maybe it will be more clear to somebody else
what the problem is.



View raw message