0

CLOSE_WAIT persists forever in kubernetes container [Linux] Even though my APP running in Java uses less heap space; My container memory is high always. On checking CLOSE_WAIT around 50 connections always persistent. Not sure if this is reason for high memory consumption in containers as per LENS metrics. If this CLOSE_WAIT is the possible suspect then is there any way to logoff these connections explicitly from linux or any utility can be developed to run as cron job [I know APP running in java is not closing ]

Tried setting up net.ipv4.tcp_keepalive_time but that doesn't solve CLOSE_WAIT

  • Please provide more details regarding the issue faced. for ex: web / app server used. its mostly application code where you need to check and close the connections at all appropriate places. For general tcp close_wait you can refer following thread https://stackoverflow.com/questions/15912370/how-do-i-remove-a-close-wait-socket-connection – Nataraj Medayhal Aug 21 '23 at 09:17
  • Its on Webserver side using Wildfly. Well YES it should be handled code level. Im exploring if any option to do it explicitly like a PROBE check and remove them. Not sure if a Kill to that specific port may kill the entire parent process and restart the POD automatically. Thanks – Suresh Ganesan Aug 21 '23 at 09:22

0 Answers0