Mark, Its locked up now and I have the dump but it wont let me email it. Can I email the whole file somewhere?
Cheers Greg On 22 December 2016 at 09:17, Mark Thomas <ma...@apache.org> wrote: > On 22/12/2016 08:55, Greg Huber wrote: > > I installed exactly the same versions on my newer centos 7 server and it > > does not lock up. > > > > I have seem this problem before as the production box is old and very > > slow. There may have been some changes to the connector stuff for a > > map/list where it is trying to add and remove at the same time causing a > > dead lock (eg use a CopyOnWriteArrayList etc instead). This would explain > > why it is erratic and happens on startup (where system is going to be > slow). > > > > Would it be better to log an issue for this? > > Unless you can provide reliable steps to reproduce, an issue based on > the information provided so far is likely to get resolved as invalid. > > When the lock up occurs, take 3 thread dumps ~10s apart. That should > tell you a) any deadlocks, b) what each of the threads is doing and c) > identify which threads should be moving that aren't. > > If you need help analysing the thread dumps, post them (or links to > them) here. > > Mark > > > > > Cheers Greg > > > > > > > > On 20 December 2016 at 14:10, Christopher Schultz < > > ch...@christopherschultz.net> wrote: > > > > Greg, > > > > On 12/20/16 3:21 AM, Greg Huber wrote: > >>>>> If you are using httpd + mod_jk, why are you bothering with APR > >>>>> and tcnative on the Tomcat side? > >>>> > >>>> It complains in the log file so I do what it says. If I don't need > >>>> it it saves me having to compile it all the time. > > > > You get complaints about the APR library not being installed? Yeah, > > just comment-out the APRLifecycleListener in conf/server.xml. > > > >>>>> What if you use the NIO connector instead of APR? > >>>> > >>>> Have always run tomcat with apache and mod_jk has always worked. I > >>>> could look at NIO if all else fails. > > > > No matter what kind of protocol you use (HTTP, AJP13), you can still > > choose the I/O strategy (APR, NIO, NIO2). The pure-Java blocking I/O > > connector (BIO) was removed in 8.5.x and 9.0.x, so that's no longer an > > option. > > > >>>>> Can you post your <Connector> configuration? > >>>> > >>>> I do not modify anything here. > >>>> > >>>> My setup: > >>>> > >>>> workers.properties: > >>>> > >>>> worker.list=worker1 worker.worker1.type=ajp13 > >>>> worker.worker1.host=localhost worker.worker1.port=8009 > >>>> worker.worker1.lbfactor=50 worker.worker1.socket_keepalive=1 > >>>> > >>>> tomcat.conf > >>>> > >>>> ... JkWorkersFile "/etc/httpd/conf.d/workers.properties" # Set the > >>>> log file JkLogFile "/etc/httpd/logs/mod_jk.log" JkShmFile > >>>> "/etc/httpd/logs/jk-runtime-status.log" JkLogLevel info > >>>> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" .... <VirtualHost *:80> > >>>> ... JkMount / worker1 JkMount /* worker1 </VirtualHost> > > > > That looks okay to me, though it doesn't look like you actually need > > httpd in the mix, here. I'll just assume that you are fronting Tomcat > > for a good reason and not "because that's how it's supposed to be done." > > > >>>> setenv.sh : > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xms256m" export > >>>> CATALINA_OPTS="$CATALINA_OPTS -Xmx768m" > > > > Off-topic hint: if you are going to give your JVM 768M, you may as > > well do it all at once and set -Xms == -Xmx. > > > >>>> export CATALINA_OPTS="$CATALINA_OPTS -Xss256k" > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParallelGC" > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=1500" > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:GCTimeRatio=9" > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -server" > >>>> > >>>> export CATALINA_OPTS="$CATALINA_OPTS -XX:+DisableExplicitGC" > >>>> > >>>> > >>>> Not sure where these exports came from but they seem to work up to > >>>> 8.5.x > > > > They control the JVM, not Tomcat. If you are administering this Tomcat > > instance, I urge you to learn more about what they do. Mysteries don't > > help administrators do their jobs. > > > >>>> The last start/stop catalina.out : > >>>> > >>>> 17-Dec-2016 15:21:51.022 INFO [main] > >>>> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded > >>>> APR based Apache Tomcat Native library 1.2.10 using APR version > >>>> 1.5.2. 17-Dec-2016 15:21:51.022 INFO [main] > >>>> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR > >>>> capabilities: IPv6 [true], sendfile [true], accept filters [false], > >>>> random [true]. 17-Dec-2016 15:21:51.023 INFO [main] > >>>> org.apache.catalina.core.AprLifecycleListener.lifecycleEvent > >>>> APR/OpenSSL configuration: useAprConnector [false], useOpenSSL > >>>> [true] 17-Dec-2016 15:21:51.036 INFO [main] > >>>> org.apache.catalina.core.AprLifecycleListener.initializeSSL > >>>> OpenSSL successfully initialized (OpenSSL 1.0.2j 26 Sep 2016) > >>>> 17-Dec-2016 15:21:52.967 INFO [main] > >>>> org.apache.coyote.AbstractProtocol.init Initializing > >>>> ProtocolHandler ["http-nio-8080"] 17-Dec-2016 15:21:53.124 INFO > >>>> [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector > >>>> Using a shared selector for servlet write/read 17-Dec-2016 > >>>> 15:21:53.160 INFO [main] org.apache.coyote.AbstractProtocol.init > >>>> Initializing ProtocolHandler ["ajp-nio-8009"] > > > > So, you've got an HTTP connector on port 8080 and an AJP connector on > > port 8009. You aren't using TLS at all, so you can definitely let the > > APR LifecycleListener go and stop re-compiling libtcnative for each > > release. It looks like you also aren't using your connector on port > > 8080, so you can disable that, too. You likely have JVM threads that > > are sitting idle all the time. > > > > Oh, and you're already using NIO. :) > > > >>>> 17-Dec-2016 15:23:08.320 INFO [main] > >>>> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler > >>>> [http-nio-8080] 17-Dec-2016 15:23:08.341 INFO [main] > >>>> org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler > >>>> [ajp-nio-8009] > > > > Looks like these guys started-up okay. > > > >>>> 17-Dec-2016 15:23:08.342 INFO [main] > >>>> org.apache.catalina.startup.Catalina.start Server startup in 75173 > >>>> ms > > > > Okay. > > > >>>> 17-Dec-2016 15:59:45.589 INFO [Thread-7] > >>>> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler > >>>> ["http-nio-8080"] 17-Dec-2016 15:59:45.805 INFO [Thread-7] > >>>> org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler > >>>> ["ajp-nio-8009"] > > > > A few minutes later, you stop the server. > > > > I don't see any problems, here, except that you are saying you are > > getting connection failures. > > > > After Tomcat is started, can you run this command on the server > > running both httpd and Tomcat? > > > > $ sudo netstat -plan | grep 8009 > > > > -chris > >> > >> --------------------------------------------------------------------- > >> 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 > >