Hello Konstantin, The protocol buffers client uses a standard TCP socket and does a blocking read. If it's never returning from there, then the Riak node you're talking to is in some state where it's not replying nor closing the connection. By default in Java a read won't ever time out; it will stay blocked until either there's something to read, or the TCP connection is closed.
>From the client side, you can specify a read time out via the PBClientConfig using the .withRequestTimeoutMillis() option in the builder. This will cause the operation to time out rather than wait forever. - Roach On Tue, May 21, 2013 at 3:46 PM, Konstantin Kalin <[email protected]> wrote: > Hello, > > I use Riak Java client (1.0.6) and riak-pb (1.2) versions. I see that a > thread stucks on reading socket from time to time in production. Basically > the thread is never released once it gets this state. Riak backend logs are > empty at the same time. Could you please look at the following stack trace? > I need an advise what can be wrong and how to investigate/solve the issue. > > Thank you, > Konstantin. > > "http-8443-7" daemon prio=10 tid=0x00007f886800a800 nid=0x1fda runnable > [0x00007f88d2794000] > > java.lang.Thread.State: RUNNABLE > > at java.net.SocketInputStream.socketRead0(Native Method) > > at java.net.SocketInputStream.read(SocketInputStream.java:146) > > at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) > > at java.io.BufferedInputStream.read(BufferedInputStream.java:254) > > - locked <0x00000007a668acb0> (a java.io.BufferedInputStream) > > at java.io.DataInputStream.readInt(DataInputStream.java:387) > > at com.basho.riak.pbc.RiakConnection.receive(RiakConnection.java:110) > > at > com.basho.riak.pbc.RiakClient.processFetchReply(RiakClient.java:280) > > at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:254) > > at com.basho.riak.pbc.RiakClient.fetch(RiakClient.java:243) > > at > com.basho.riak.client.raw.pbc.PBClientAdapter.fetch(PBClientAdapter.java:156) > > at > com.basho.riak.client.raw.ClusterClient.fetch(ClusterClient.java:115) > > at > com.basho.riak.client.operations.FetchObject$1.call(FetchObject.java:102) > > at > com.basho.riak.client.operations.FetchObject$1.call(FetchObject.java:100) > > at > com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:72) > > at > com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:53) > > at > com.basho.riak.client.operations.FetchObject.execute(FetchObject.java:106) > > at > platform.sessionstore.riak.RiakSessionStore.executeCmd(RiakSessionStore.java:290) > > at > platform.sessionstore.riak.RiakSessionStore.validate(RiakSessionStore.java:248) > > at > platform.sessionstore.riak.RiakUserSessionsResolver.resolve(RiakUserSessionsResolver.java:74) > > at > platform.sessionstore.riak.RiakUserSessionsResolver.resolve(RiakUserSessionsResolver.java:16) > > at > com.basho.riak.client.operations.FetchObject.execute(FetchObject.java:113) > > at > platform.sessionstore.riak.RiakSessionStore.executeCmd(RiakSessionStore.java:290) > > at > platform.sessionstore.riak.RiakSessionStore.fetchUserSessions(RiakSessionStore.java:270) > > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
