Running out of SSH connections
search cancel

Running out of SSH connections

book

Article ID: 218582

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Clients connecting to the gateway via SFTP are failing when the pool size is reached.  How can the pool size be increased? 

Error ssg log:

2021-05-15T02:15:28.023-0400 SEVERE  1667 com.l7tech.external.assertions.ssh.server.ae: Exception caught in SFTP subsystem
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@45c1b467 rejected from com.l7tech.util.c6@3ea5c0c[Running, pool size = 20, active threads = 20, queued tasks = 25, completed tasks = 118]

Each gateway shows 124 connections. Below are cluster property settings implemented but none of them change the pool size:

ssh.responseDownloadThreadLimit = 100
ssh.session.pool.maxActive = 500
ssh.routingInactiveTinmeout = 10s

 

Environment

API Gateway 10.x

Resolution

You can add and adjust the hidden CWP sftp.messageProcessingThreadLimit (pool size) - global limit of processing threads for SFTP requests (default 20)

For example, set sftp.messageProcessingThreadLimit = 100 

Perfom a test that overloads the SSH2 assertions with over 100 concurrent requests. 

(NOTE: the pool size now reflects the large amount of threads) 

2021-06-18T14:30:25.670-0400 WARNING 1136 com.l7tech.external.assertions.ssh.server.ServerSshRouteAssertion: 9434: SSH routing error: Task java.util.concurrent.FutureTask@451f3d38 rejected from com.l7tech.util.c6@4e10d20c[Running, pool size = 100, active threads = 3, queued tasks = 25, completed tasks = 14892]