-----Original Message-----
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] 
Sent: Thursday, February 27, 2014 2:40 PM
To: Tomcat Users List
Subject: Re: tomcat 6 refuses mod_jk connections after server runs for a couple 
of days

2014-02-28 2:06 GMT+04:00 Isaac Gonzalez <igonza...@autoreturn.com>:
> Hi Christopher(and Konstantin), attached is a couple of thread dumps of when 
> we experienced the issue again today. I also noticed we get this message 
> right before the problem occurs:
> Feb 27, 2014 12:47:15 PM 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
> SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create 
> new native thread) executing 
> org.apache.jk.common.ChannelSocket$SocketAcceptor@177ddea, terminating 
> thread

That explains why a connection cannot be accepted.

I wonder are you hitting an "ulimit" limit, or there is just not enough free 
memory to allocate stack area for a new thread (which size is set by -Xss 
option to java executable).

        I thought of the ulimit settings and increased it to the upward limit 
allowed at the end of last weekend:
                [root@server ~]# su tomcat
                [tomcat@server root]$ ulimit -a
                core file size          (blocks, -c) 0
                data seg size           (kbytes, -d) unlimited
                scheduling priority             (-e) 0
                file size               (blocks, -f) unlimited
                pending signals                 (-i) 62835
                max locked memory       (kbytes, -l) 64
                max memory size         (kbytes, -m) unlimited
                open files                      (-n) 65535
                pipe size            (512 bytes, -p) 8
                POSIX message queues     (bytes, -q) 819200
                real-time priority              (-r) 0
                stack size              (kbytes, -s) 10240
                cpu time               (seconds, -t) unlimited
                max user processes              (-u) 1024
                virtual memory          (kbytes, -v) unlimited
                file locks                      (-x) unlimited

                Here is my options I am passing to Java in my init 
script....(I'm not using the -Xss option)
-Dbuild.compiler.emacs=true -XX:MaxPermSize=256M -Xmx2048m 
-Duser.timezone=America/Los_Angeles -Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=8089 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false -Xdebug 
-Xrunjdwp:transport=dt_socket,address=8003,server=y,suspend=n

Your thread dumps contain 149 threads each.

So I am not maxing out threads...seems like each tomcat node is running out of 
memory at the same time....

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to