Skip to main content

Too Many Open Files???

2 replies [Last post]
sdoca
Offline
Joined: 2010-04-22

We recently upgraded to GF 3.1.2 and since then have been experiencing "Too many open files" errors. This seems to occur when accessing the admin console and deploying/undeploying applications. These are the types of errors we are seeing:

[#|2012-07-05T15:09:28.395-0600|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=37;_ThreadName=Thread-2;|com.sun.webui.jsf.component.DropDown::The current value of comp
onent propertyForm:deployTable:topActionsGroup1:filter does not match any of the selections.
Did you forget to reset the value after changing the options? |#]

[#|2012-07-05T15:09:28.464-0600|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=38;_ThreadName=Thread-2;|java.net.SocketException: Too many open files;
java.net.SocketException: Too many open files;
restRequest: endpoint=https://localhost:4848/management/domain/configs/config.json
attrs={}
method=get|#]

[#|2012-07-05T15:09:28.466-0600|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=38;_ThreadName=Thread-2;|java.net.SocketException: Too many open files;
java.net.SocketException: Too many open files;
restRequest: endpoint=https://localhost:4848/management/domain/configs/config//jms-service/jms-host.json
attrs={}
method=get|#]

[#|2012-07-05T15:09:28.468-0600|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=38;_ThreadName=Thread-2;|java.net.SocketException: Too many open files;
java.net.SocketException: Too many open files;
restRequest: endpoint=https://localhost:4848/management/domain/configs/config//security-service/auth-realm.json
attrs={}
method=get|#]

[#|2012-07-05T15:09:28.471-0600|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=38;_ThreadName=Thread-2;|java.net.SocketException: Too many open files;
java.net.SocketException: Too many open files;
restRequest: endpoint=https://localhost:4848/management/domain/configs/config//security-service/audit-module.json
attrs={}
method=get|#]

[#|2012-07-05T15:09:28.472-0600|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=38;_ThreadName=Thread-2;|java.net.SocketException: Too many open files;
java.net.SocketException: Too many open files;
restRequest: endpoint=https://localhost:4848/management/domain/configs/config//security-service/jacc-provider.json
attrs={}
method=get|#]

.... many, many more errors like above for different json endpoints .....

[#|2012-07-05T15:10:54.628-0600|WARNING|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=11;_ThreadName=Thread-2;|GRIZZLY0006: Exception accepting channel
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:152)
at com.sun.grizzly.TCPSelectorHandler.acceptWithoutRegistration(TCPSelectorHandler.java:747)
at com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler.acceptWithoutRegistration(MonitorableSelectorHandler.java:99)
at com.sun.grizzly.http.SelectorThreadHandler.onAcceptInterest(SelectorThreadHandler.java:99)
at com.sun.grizzly.SelectorHandlerRunner.handleSelectedKey(SelectorHandlerRunner.java:301)
at com.sun.grizzly.SelectorHandlerRunner.handleSelectedKeys(SelectorHandlerRunner.java:263)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:200)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
|#]

Is this a bug? Have we configured something wonky in our Glassfish?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sonersivri
Offline
Joined: 2006-04-10

This problem occurs when kernel settings of ulimit user who starts application, is small.
use
ulimit -n 500000
it is ok before next restart
and next restart you don't want to get the same error
change
/etc/security/limits.conf

root soft nofile 500000
root hard nofile 500000

sdoca
Offline
Joined: 2010-04-22

Thanks!