users@glassfish.java.net

Re: Running out of operating systems file descriptors. Cannot serve requests anymore. in Grizzly

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 21 Oct 2009 12:40:35 -0400

Lasitha Kodikara wrote:
> Hi,
>
>
>
> Thanks for the help. Can anyone please recommend me a initial value for
> the ulimit -n, currently it is set to default (1024). I guess this
> should not be the value for a production server. Can someone please
> suggest me a ulimit –n for a production glassfish server.

How many concurrent requests are you expecting to serve? Just set it to
the maximum if you don't know.


Note that you are seeing Grizzly stack trace, but file descriptor are
used all over the place in GF. So the problem manifest with Grizzly but
this is unrelated to Grizzly :-)

A+

-- Jeanfrancois


>
>
>
> Thanks in Advance,
>
> Regards,
>
> Lasitha
>
>
>
> *From:* Steve.Essery_at_Sun.COM [mailto:Steve.Essery_at_Sun.COM]
> *Sent:* Wednesday, October 21, 2009 2:48 PM
> *To:* users_at_glassfish.dev.java.net
> *Subject:* Re: Running out of operating systems file descriptors. Cannot
> serve requests anymore. in Grizzly
>
>
>
> I believe ulimit, with no arguments, reports the file size limit.
>
> You would want ulimit -n to see the limit on the number of file
> descriptors that can be open at one time.
>
> While this following link is for the directory server, it does run
> through how to increase the number of file descriptors on a Redhat 4 system:
>
> http://www.redhat.com/docs/manuals/dir-server/install/8.0/Installation_Guide-Support-Platforms.html#Installation_Guide-Platform_Support-File_Tuning
>
> which might help.
>
> Lasitha Kodikara wrote:
>
> Hi All,
>
>
>
> In our production server the following error occurs. We are having a 1
> instance GF cluster. We are starting the server using root and when I
> check the ulimit of the machine, *it says unlimited*. We are using Red
> Hat AS 4 Update 2 as the OS.
>
>
>
> “
>
> [root_at_mimax ~]# ulimit
>
> Unlimited
>
>
> “
>
>
>
> Please help me to solve this problem.
>
>
>
> Regards,
>
> Lasitha
>
>
>
> [#|2009-10-20T17:55:39.945+0530|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=203;_ThreadName=SelectorThread-6061;_RequestID=825100e1-eedf-4fde-b2fb-436dd5972802;|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)
>
> |#]
>
>
>
> [#|2009-10-20T17:55:39.946+0530|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=203;_ThreadName=SelectorThread-6061;_RequestID=825100e1-eedf-4fde-b2fb-436dd5972802;|WEB0756:
> Caught exception during HTTP processing.
>
> 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)
>
> |#]
>
>
>
> *******************************************************************************************************************************************************************
>
> "The information contained in this email including in any attachment is
> confidential and is meant to be read only by the person to whom it is
> addressed. If you are not the intended recipient(s), you are prohibited
> from printing, forwarding, saving or copying this email. If you have
> received this e-mail in error, please immediately notify the sender and
> delete this e-mail and its attachments from your computer."
>
> *******************************************************************************************************************************************************************
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net For
> additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> *******************************************************************************************************************************************************************
>
> "The information contained in this email including in any attachment is
> confidential and is meant to be read only by the person to whom it is
> addressed. If you are not the intended recipient(s), you are prohibited
> from printing, forwarding, saving or copying this email. If you have
> received this e-mail in error, please immediately notify the sender and
> delete this e-mail and its attachments from your computer."
>
> *******************************************************************************************************************************************************************
>