Proxy produces the following error message: Caused by: java.io.IOException: Too many open files

book

Article ID: 132397

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

While active, the proxy Agent can encounter an issue that causes a java exception similar to:

Critical error: Selector caught an exception: 
java.lang.RuntimeException: This error should have been handled already 
at com.uc4.proxy.Server.proxySocketError(Unknown Source) 
at com.uc4.proxy.Server$3.socketError(Unknown Source) 
at com.uc4.proxy.nbio.Acceptor.handleAccept(Unknown Source) 
at com.uc4.proxy.nbio.SelectorThread.run(Unknown Source) 
at com.uc4.proxy.nbio.SelectorThread.access$000(Unknown Source) 
at com.uc4.proxy.nbio.SelectorThread$1.run(Unknown Source) 
at java.lang.Thread.run(Thread.java:748) 
Caused by: java.io.IOException: Too many open files 
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) 
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422) 
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250) 

Cause

This is caused by improper handling of new files being opened when reaching an OS-level maximum. 

 

Environment

Release:
Component: APROXY

Resolution

As a workaround, you can stop the Proxy and set the ulimit for the system the proxy resides on to unlimited.

Additionally, the issue was found and fixed with:

Proxy 3.0.1 in Proxy released 05-20-2019

Hotfix-Description: Proxy aborts when the process file descriptor limit is reached. 

Proxy aborts with JVM IOException when the process file descriptor limit is reached.