Regarding an error "Too Many open files"

NoojiNooji Shivaprashanth NujiOrganization: personalProject: C++ to java RPC using ICE.. Migrating from comfyjMember

I am encountering this error sometimes when i run the icebox/icestorm client. I am not able to understand what can cause this?
Can anyone give some pointers to look?

Client is running on Linux and server in windows. Ice 3.6.2 being used.

016-09-27 07:03:24.158 ERROR 999 — [ Thread-6] c.p.f.p.e.f.s.i.ApplicationServiceImpl : java.io.FileNotFoundException: /app/config/Config.sub (Too many open files)
Ice.FileException: java.io.FileNotFoundException: /app/config/Config.sub (Too many open files)
at Ice.PropertiesI.load(PropertiesI.java:430) ~[xyz.jar:na]
at Ice.PropertiesI.loadConfig(PropertiesI.java:756) ~[xyz.jar:na]
at Ice.PropertiesI.(PropertiesI.java:537) ~[xyz.jar:na]
at Ice.Util.createProperties(Util.java:66) ~[xyz.jar:na]
at Ice.Util.initialize(Util.java:163) ~[xyz.jar:na]
at Ice.Util.initialize(Util.java:120) ~[xyz.jar:na]
at Ice.Util.initialize(Util.java:135) ~[xyz.jar:na]
at com.IceRuntime.Init(IceRuntime.java:14) ~[xyz.jar:na]
at com.impl.ApplicationServiceImpl.initialize(ApplicationServiceImpl.java:57) ~[xyz.jar:na]
at com.impl.OperationManagerImpl.initializeApplicationService(OperationManagerImpl.java:221) [xyz.jar:na]
at com.impl.OperationManagerImpl.initializeE(OperationManagerImpl.java:178) [xyz.jar:na]
at com.impl.OperationManagerImpl.access$400(OperationManagerImpl.java:27) [xyz.jar:na]
at com.impl.OperationManagerImpl$1.run(OperationManagerImpl.java:108) [xyz.jar:na]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
Caused by: java.io.FileNotFoundException: /app/config/Config.sub (Too many open files)
at java.io.FileInputStream.open0(Native Method) ~[na:1.8.0_91]
at java.io.FileInputStream.open(FileInputStream.java:195) ~[na:1.8.0_91]
at java.io.FileInputStream.(FileInputStream.java:138) ~[na:1.8.0_91]
at IceInternal.Util.openResource(Util.java:101) ~[xyz.jar:na]
at Ice.PropertiesI.load(PropertiesI.java:403) ~[xyz.jar:na]
... 13 common frames omitted

2016-09-27 07:03:21.376 WARN 999 — [inagle/netty3-5] o.j.n.c.socket.nio.AbstractNioSelector : Failed to accept a connection.
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) ~[na:1.8.0_91]
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422) ~[na:1.8.0_91]
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250) ~[na:1.8.0_91]
at org.jboss.netty.channel.socket.nio.NioServerBoss.process(NioServerBoss.java:100) [io.netty.netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) [io.netty.netty-3.10.1.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) [io.netty.netty-3.10.1.Final.jar:na]
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [io.netty.netty-3.10.1.Final.jar:na]
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) [io.netty.netty-3.10.1.Final.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]

Best Answer

Answers

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff

    The error indicates that the process has exceed the maximum open file descriptors. In Linux you can see the current limits with the command:

    ulimit -a
    

    If your client opens too many connections or files you might need to raise the limits.

  • NoojiNooji Shivaprashanth NujiOrganization: personalProject: C++ to java RPC using ICE.. Migrating from comfyjMember

    Thanks for the reply.

    If the server is down, and if ice client tries reconnecting will it open a new connection without closing the previous?

  • xdmxdm La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice DeveloperAdministrators, ZeroC Staff ZeroC Staff
    Accepted Answer

    If the server is down the client connection will be closed as soon as it detects server is down. See https://doc.zeroc.com/display/Ice36/Connection+Management

    If you enable network tracing in your client you will be able to see when a new connection is open, https://doc.zeroc.com/pages/viewpage.action?pageId=16716654

Sign In or Register to comment.