Thanks for the reply, I will up the memory on the heap space and have
another go with the profiler if happens again.  When I was looking at the
thread dumps there were no other active threads other than the
ajp-apr-8009-Poller so maybe it is only a memory issue.

Cheers Greg.

On 3 May 2015 at 17:35, Felix Schumacher <felix.schumac...@internetallee.de>
wrote:

>
>
> Am 3. Mai 2015 12:25:53 MESZ, schrieb Greg Huber <gregh3...@gmail.com>:
> >Hello,
> >
> >After an upgrade to Tomcat 8.0.21 and (Oracle jdk1.8.0_40) I seem to be
> >having an erratic high cpu issue, often  when the server gets busy.
> >The
> >application was OK tomcat 7 and has not been modified since the
> >upgrade.
> >
> >I use mod_jk / apache
> >
> >#
> ># workers.properties
> >#
> >
> ># Define 1 real worker using ajp13
> >worker.list=worker1
> ># Set properties for worker1 (ajp13)
> >worker.worker1.type=ajp13
> >worker.worker1.host=localhost
> >worker.worker1.port=8009
> >worker.worker1.lbfactor=50
> >worker.worker1.socket_keepalive=1
> >
> >Here are my startup options:
> >
> >Tomcat 7
> >JAVA_OPTS="-Xms128M -Xmx512m -XX:MaxPermSize=256m"
> >
> >Tomcat 8  (java 8 does not support MaxPermSize)
> >
> >JAVA_OPTS="-Xms128M -Xmx512m"
>
> I believe java 8 combines the permgen into the heap space, so it is
> possible, that you run out of space now that you use java 8.
>
> Use jstat, jvisualvm or jconsole to look at your gc cycles. They can
> consume a lot of cpu.
>
> >
> >If I trace the thread it seems to be related to ajp-apr-8009-Poller
> >
> >"ajp-apr-8009-Poller" #26 daemon prio=5 os_prio=0
> >tid=0x00007ffe300bd000
> >nid=0xc82 runnable [0x00007ffdd1fd1000]
> >   java.lang.Thread.State: RUNNABLE
> >    at sun.misc.Unsafe.unpark(Native Method)
>
> This thread does nothing.
>
>
> > at java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:141)
> >    at
>
> >java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)
> >    at
>
> >java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1264)
> >    at
> >java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)
> >    at
>
> >java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:176)
> >    at
>
> >java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
> >   at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
> >   at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
> >    at
>
> >java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
> >    at
>
> >org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
> >    at
>
> >org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
> >    at
> >org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
> >    at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
> >    at java.lang.Thread.run(Redefined)
> >
> >....
> >
> >"ajp-apr-8009-Poller" #26 daemon prio=5 os_prio=0
> >tid=0x00007ffe300bd000
> >nid=0xc82 runnable [0x00007ffdd1fd1000]
> >   java.lang.Thread.State: WAITING (parking)
> >    at sun.misc.Unsafe.park(Native Method)
>
> This thread does nothing,  either.
>
> >    - parking to wait for  <0x00000000e4a05160> (a
> >java.util.concurrent.locks.ReentrantLock$NonfairSync)
> >   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
> >    at
>
> >java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
> >    at
>
> >java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:870)
> >    at
>
> >java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1199)
> >    at
>
> >java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:209)
> >at
> >java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285)
> >    at
>
> >java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:172)
> >    at
>
> >java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
> >   at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
> >   at org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)
> >    at
>
> >java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)
> >    at
>
> >org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:161)
> >    at
>
> >org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)
> >    at
> >org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.java:896)
> >    at org.apache.tomcat.util.net.AprEndpoint$Poller.null (Redefined)
> >    at java.lang.Thread.run(Redefined)
> >
> >
> >Killing the thread stops the cpu, but then Tomcat does not work.  Any
> >ideas
> >what would be causing this?
>
> You might look for other threads, that do something. I would be especially
> suspicious about array resizing operations.
>
> Regards
> Felix
>
> >
> >
> >Cheers Greg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to