Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.13.0
-
None
-
None
Description
Raised from https://jira.atlassian.com/browse/STASH-7105
If you open and close a connection really fast it seems to hold onto lots of them in IoServiceListenerSupport
In the wild this is sometimes caused by haproxy health checks.
Can be reproduced running this python script
import socket import sys TCP_IP = '127.0.0.1' TCP_PORT = 7999 def makeTestConnection(): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) s.close() numConnections = 10000 if len(sys.argv) == 2: numConnections = int(sys.argv[1]) for i in range(numConnections): print(str(i)) makeTestConnection()
If you take a heap dump afterwards you will see lots of session objects.
There seems to be a 2 minute auth timeout that gets hit and some of the sessions are removed but the majority are not removed.
Creating 10000 connections in seems to result in around 7000 of them hanging around.
Attachments
Attachments
Issue Links
- duplicates
-
SSHD-374 Nio2Acceptor never unbinding
- Resolved