users@glassfish.java.net

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

From: Lasitha Kodikara <lasithabk_at_millenniumit.com>
Date: Wed, 21 Oct 2009 22:55:10 +0530

Hi,

Thanks a lot for the help given. Really appreciate it.

Best Regards,
Lasitha

-----Original Message-----
From: Jeanfrancois.Arcand_at_Sun.COM [mailto:Jeanfrancois.Arcand_at_Sun.COM]
Sent: Wednesday, October 21, 2009 10:11 PM
To: users_at_glassfish.dev.java.net
Subject: Re: Running out of operating systems file descriptors. Cannot
sgaerve requests anymore. in Grizzly



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.sys
tem.container.web|_ThreadID=203;_ThreadName=SelectorThread-6061;_RequestID=8
25100e1-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(Selecto
rThread.java:1478)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.handleConnection(Sel
ectorThread.java:1457)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.doSelect(SelectorThr
ead.java:1361)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.startListener(Select
orThread.java:1295)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.startEndpoint(Select
orThread.java:1258)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.run(SelectorThread.j
ava:1234)
>
> |#]
>
>
>
>
[#|2009-10-20T17:55:39.946+0530|SEVERE|sun-appserver2.1|javax.enterprise.sys
tem.container.web|_ThreadID=203;_ThreadName=SelectorThread-6061;_RequestID=8
25100e1-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(Selecto
rThread.java:1478)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.handleConnection(Sel
ectorThread.java:1457)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.doSelect(SelectorThr
ead.java:1361)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.startListener(Select
orThread.java:1295)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.startEndpoint(Select
orThread.java:1258)
>
> at
>
com.sun.enterprise.web.connector.grizzly.SelectorThread.run(SelectorThread.j
ava: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."
>
>
****************************************************************************
****************************************************************************
***********
>

---------------------------------------------------------------------
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."

*******************************************************************************************************************************************************************