Kill a stale Gemfire Client
search cancel

Kill a stale Gemfire Client

book

Article ID: 294428

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

How to kill these clients connections that are stale which actually are not running from server side

How to kill a stale client

Symptoms:
It has been noticed that some clients are still live after the clients have stopped abruptly. We can identify the clients but need some way for how to destroy the connection.

Environment

Product Version: 9.15

Resolution

These are the options to handle stale connections:
1. When the GemFire cluster is restarted, the clients need to be restarted as well, to avoid stale data, which is cached in clients about the servers and locators.

2. If this stale connection related to pdx then please use below KB (gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS=true ):
 https://knowledge.broadcom.com/external/article?articleNumber=294139 

3. Please follow best practices guide of Gemfire to get ride of stale connections:

 https://knowledge.broadcom.com/external/article?articleNumber=294018 


4. To close/clean stale connection we can use standard linux command by using below doc: https://computingforgeeks.com/how-to-check-tcp-connections-states-in-linux-with-netstat/

5. There is no direct option to close a client connection at Gemfire server/gfsh manually by us.

We do have durable client connection that can be closed(close durable-client):

Ref: https://docs.vmware.com/en/VMware-GemFire/10.0/gf/tools_modules-gfsh-command-pages-close.html#topic_4125AAAB9FE44CD787166E48B694C41D

 

To control client connection at Gemfire side, we suppose to tune few parameter which could help to reduce stale connection like max-connections etc:

https://docs.vmware.com/en/VMware-GemFire/9.15/gf/topologies_and_comm-topology_concepts-how_the_pool_manages_connections.html

 

So far we don’t have any kind of utility to close a non-durable client connection from gfsh/server side.


Checklist:

  1. gfsh>list clients
  2. gfsh>describe client --clientID=xxxxxx