users@glassfish.java.net

Re: "Too many open files" problem

From: Alan Frechette <Alan.Frechette_at_Sun.COM>
Date: Tue, 15 May 2007 12:20:21 -0400

Solution to the Too many open files problem.

I have further input on the too many open files issue. On SOLARIS the
soft and hard limit for number of open files is 256 for a non root user.

For a root user the soft limit is 256 and the hard limit is 65536.

So if you start the GF Appserver as root you will have a hard limit of
65536. You will not get too many open files.

If on the other hand you start the GF Appserver as a non root user you
will have a hard limit of 256. This will most likely cause too many open
files from appserver.

WORKAROUNDS
-----------

1) Run the GF Appserver as root. You will get the 65536 (64K) hard limit

2) If you run the GF Appserver as a yourself do the following. From your
    terminal window do an "rlogin back into your system". This will give
    you a "in.rlogind" process that is owned by root. You can then start
    the GF Appserver as yourself. This will give you a hard limit of 64K
    because the "in.rlogind" process is owned by root. I have tried this
    and it works. So to summarize:

    % rlogin host -l yourself
    % asadmin start-domain //Your GF Appserver will now have 64K
                                //open file limit






glassfish_at_javadesktop.org wrote:
> Hello,
>
> after leaving the glassfish (9.1 (build b33e-beta)) running for a few hours it runs into "too many open files" problem. After that there is a mess.
>
> I suspect it has something to do with JMS, because this is what I recently added. Every 60 seconds a timer generates a message into a queue, which is handled. I always close the producer, the session and the connection (when sending). Handling the message is currently doing nothing (or almost nothing, depending on configuration), but always succeeds.
>
> What I find suspicious is that every few minutes there is a following trace, always twice (does it mean it generations new and new connections?):
> [#|2007-05-03T23:32:54.107+0200|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=34;_ThreadName=Timer-4;_RequestID=a17dfebf-c2c
> c-4850-a198-e22cfe7776ac;|
> MQRA:MC:Warning:createConnection API used w/o username, password for Application Auth|#]
>
> [#|2007-05-03T23:32:54.136+0200|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=34;_ThreadName=Timer-4;|MQJMSRA_MC
> 1101: constructor:Created mcId=43:xacId=6560357433579922176:Using xacf config={imqDefaultUsername=guest, imqBrokerHostName=localhost, imqSetJMSXUser
> ID=false, imqJMSExpiration=0, imqQueueBrowserRetrieveTimeout=60000, imqSSLProviderClassname=com.sun.net.ssl.internal.ssl.Provider, imqConfiguredClie
> ntID=, imqSSLIsHostTrusted=false, imqSetJMSXProducerTXID=false, imqJMSDeliveryMode=PERSISTENT, imqAddressListBehavior=RANDOM, imqEnableSharedClientI
> D=false, imqAckOnProduce=, imqConnectionURL=http://localhost/imq/tunnel, imqConnectionFlowLimit=1000, imqSetJMSXAppID=false, imqAddressListIteration
> s=3, imqBrokerServicePort=0, imqSetJMSXRcvTimestamp=false, imqReconnectInterval=5000, imqConnectionType=TCP, imqLoadMaxToServerSession=true, imqSetJ
> MSXConsumerTXID=false, imqAddressList=localhost:7676, imqOverrideJMSDeliveryMode=false, imqPingInterval=30, imqDefaultPassword=guest, imqAckOnAcknow
> ledge=, imqJMSPriority=4, imqQueueBrowserMaxMessagesPerRetrieve=1000, imqOverrideJMSPriority=false, imqConsumerFlowLimit=1000, imqBrokerHostPort=767
> 6, imqReconnectEnabled=true, imqConnectionFlowCount=100, imqReconnectAttempts=3, imqConnectionFlowLimitEnabled=false, imqAckTimeout=0, imqBrokerServ
> iceName=, imqOverrideJMSExpiration=false, imqConnectionHandler=com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler, imqDisableSetClientID=
> false, imqOverrideJMSHeadersToTemporaryDestinations=false, imqConsumerFlowThreshold=50}|#]
>
> Any ideas?
>
> Thanks,
> Edek
> [Message sent by forum member 'edek234' (edek234)]
>
> http://forums.java.net/jive/thread.jspa?messageID=215579
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


-- 
Regards,
          ______
         /_____/\
        /_____\\ \
       /_____\ \\ /           Alan E. Frechette
      /_____/ \/ / /          Sun Microsystems Computer Company
     /_____/ /   \//\         One Network Drive
     \_____\//\   / /         Burlington, MA 01803-0902
      \_____/ / /\ /
       \_____/ \\ \           Email: alan.frechette_at_East.Sun.COM
        \_____\ \\            Phone (781) 442-0723 Fax (781) 442-1610
         \_____\/             Web site...http://www.sun.com