GemFire dispatcher thread is observed to be stuck on the native method call socketWrite0. A sample stack trace is shown below:
[warn <ThreadMonitor>] Thread has been performing the same operation for <XX seconds> and number of thread monitor iterations
Thread Name: <Client Message Dispatcher for YYYY> state: RUNNABLE
Thread stack for "Client Message Dispatcher for YYYY":
java.lang.ThreadState: RUNNABLE (in native)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java)
at java.net.SocketOutputStream.write(SocketOutputStream.java)
at org.apache.geode.internal.cache.tier.sockets.Message.flushBuffer(Message.java)
at org.apache.geode.internal.cache.tier.sockets.Message.sendBytes(Message.java)
GemFire version 10.1.1
This situation arises when the client-side socket buffer is full because the client is either slow to consume data or has stopped reading altogether. Consequently, the socket’s send buffer becomes saturated, causing the GemFire dispatcher thread to block on the native socketWrite0 call while attempting to write data.
Additional Context:
This is a known product issue fixed starting with GemFire version 10.1.2. To resolve this issue, upgrade your GemFire installation to version 10.1.2 or higher.
Recommendations:
For more related information, consider reviewing best practices such as limiting server subscription queue memory use.