Ronaldo,
We got around this problem by putting this entry in the .profile for the
user running Glassfish (on an AIX server):
ulimit -n 20000
'ulimit -n' sets the maximum number of file descriptors for the user.
We had 10 instances of Glassfish running on the server, so we had to set
the value quite high (default is 1024).
Steve
Jeanfrancois Arcand wrote:
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Salut,
>
> Ronaldo Rigoni ... wrote:
>> HI all,
>> I have a Glassfish V2 in production on a portal.
>> After some hours the server simply don't responds any request, in the
>> log file appears this exception.
>> The GlassFish run in Ubuntu Server 8.10 64bits, and the GlassFish
>> instance stop responding, and i need kill the instance and restart,
>> and after some time the error happens again.
>> Can anyone helpme?
>
> Some of your application leaks file descriptor, e.g. open a socket or
> a stream and never close it. You can increase the ulimit of the
> machine as a temporary workaround, but you should really found which
> component is leaking file descriptor (using lsof on Linux). I doubt it
> is GlassFish.
>
> Thanks!
>
> -- Jeanfrancois
>
>
>> Regards.
>>
>>
>> [#|2009-06-13T21:07:14.213-0300|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=76;_ThreadName=SelectorThread-80;_RequestID=d2e48fd6-b4db-4d7e-a1f0-7a3897b18efd;|Running
>> out of operating systems file descriptors. Cannot serve requests
>> anymore.
>> java.io.IOException: Too many open files
>> at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
>> at
>> sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:145)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.handleAccept(SelectorThread.java:1478)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.handleConnection(SelectorThread.java:1457)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.doSelect(SelectorThread.java:1361)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.startListener(SelectorThread.java:1295)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.startEndpoint(SelectorThread.java:1258)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.SelectorThread.run(SelectorThread.java:1234)
>>
>>
>>
>>
>>
>>
>> --
>> []'s,
>> Ronaldo Rigoni
>> http://www.ronaldorigoni.com.br
>> Desenvolvedor JEE
>> Ministério da Educação - CESPE
>>
> </div>
>