users@grizzly.java.net

Grizzly IO Error

From: Richard Corsale <igf1_at_yahoo.com>
Date: Thu, 12 Feb 2009 14:35:59 -0800 (PST)

Hi all,

I started getting this error after grizzly 1.9.5 has been running for a few minutes.

java.io.IOException: Too many open files
        at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method)
        at sun.nio.ch.EPollArrayWrapper.<init>(EPollArrayWrapper.java:68)
        at sun.nio.ch.EPollSelectorImpl.<init>(EPollSelectorImpl.java:52)
        at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:18)
        at java.nio.channels.Selector.open(Selector.java:209)
        at com.sun.grizzly.util.SelectorFactory.createSelector(SelectorFactory.java:204)
        at com.sun.grizzly.util.SelectorFactory.grow(SelectorFactory.java:213)
        at com.sun.grizzly.util.SelectorFactory.setMaxSelectors(SelectorFactory.java:90)
        at com.sun.grizzly.http.SelectorThread.initEndpoint(SelectorThread.java:1082)
        at com.sun.grizzly.http.SelectorThread.listen(SelectorThread.java:1138)
        at com.sun.grizzly.http.embed.GrizzlyWebServer.start(GrizzlyWebServer.java:566)
        at embeded.OortSystemServer.<init>(OortSystemServer.java:32)
        at embeded.OortEngine.start(OortEngine.java:38)
        at demo.test.main(test.java:39)


I'm running a few tests now (it may be my code :) ), but if anyone has seen this before, you could save me some time :)
I am opening files from a GrizzlyAdapter, and I'm sure that:

A. the object doing the opening is a singleton (it's a no constructor Enum) .
B. that I close the file.

also , this error seems to happen while the server has been Idle for a few Minuites, not drurring an actual file operation.