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):
To control client connection at Gemfire side, we suppose to tune few parameter which could help to reduce stale connection like max-connections etc:
So far we don’t have any kind of utility to close a non-durable client connection from gfsh/server side.
Checklist: