Thanks, answers below.

On Wed, Feb 3, 2016 at 11:15 PM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yuval,
>
> On 2/3/16 12:29 PM, Yuval Schwartz wrote:
> > Thanks a lot. Comments below.
> >
> > On Wed, Feb 3, 2016 at 5:02 PM, Christopher Schultz <
> > ch...@christopherschultz.net> wrote:
> >
> > Try this. Before you are ready to shut down, take note of the pid
> > of the JVM process. Then run this command:
> >
> > $ CATALINA_HOME/bin/shutdown.sh && sleep 2 && jstack [pid] >
> > stack.txt
> >
> >
> >> (Nice idea!) I performed this and it worked. What stood out was a
> >> line in 2 http-apr-8080 threads: - locked <[some number]> (a
> >> org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)
> >
> >> Does this tell us something?
>
> Can you post the rest of the stack trace?
>

Yes, sure:

"http-apr-8080-exec-7" #32 daemon prio=5 os_prio=0 tid=0x00007f118c015800
nid=0x2d10 runnable [0x00007f1192ef1000]
   java.lang.Thread.State: RUNNABLE
        at org.apache.tomcat.jni.Socket.recvbb(Native Method)
        at
org.apache.coyote.http11.InternalAprInputBuffer.doReadSocket(InternalAprInputBuffer.java:631)
        at
org.apache.coyote.http11.InternalAprInputBuffer.fill(InternalAprInputBuffer.java:583)
        at
org.apache.coyote.http11.InternalAprInputBuffer.parseRequestLine(InternalAprInputBuffer.java:140)
        at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1005)
        at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
        at
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2400)
        - locked <0x00000000f12d0080> (a
org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

The thing is, I found an identical thread from a thread dump that I called
before the shutdown (ie: before the warning was thrown). Only it was named
"http-apr-8080-exec-6".


>
> > This should request a Tomcat shutdown and take a thread dump 2
> > seconds later. If that doesn't work, adjust the sleep time until
> > you get a good snapshot. You should see a thread with a name like
> > http-apr-8080-[#] that is doing something inside your application.
> > then its up to you to figure out why it's still running.
> >
> >
> >> As far as I can tell, I only get this WARNING when my elastic
> >> load balancer is pinging pages on my web app.
>
> ELB usually uses HTTP keepalive, so that might be part of the issue.
>
> > What is your connector configuration?
> >
> >> The connector element in $CATALINA_HOME/conf/server.xml looks
> >> like this: <Connector port="8080" protocol="HTTP/1.1"
> >> connectionTimeout="20000" redirectPort="8443" /> (there is a
> >> commented connector after it with an attribute of
> >> "executor=tomcatThreadPool"...but this is commented out).
>
> So that's pretty much the default configuration. Good to know.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlaybdUACgkQ9CaO5/Lv0PCS7wCeMKCjgMLSrGAAj5lQUjGG5oza
> w34An2e7kYagW6zIN6tPTS7kXu/XcAf7
> =eZ7k
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to