-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Greg,

On 5/3/15 2:30 PM, Greg Huber wrote:
> 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.

No, the Poller thread can be quite active, but you will only see it in
a few configurations because it mostly blocks on select(), and then
notifies other threads that their I/O work is done.

Car analogy: it's the distributor cap of all the bytes flying around
the container.

- -chris

> 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.unparkSuccesso
r(AbstractQueuedSynchronizer.java:662)
>>>
>>> 
at
>> 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.release(Abstra
ctQueuedSynchronizer.java:1264)
>>>
>>> 
at
>>> java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:4
57)
>>>
>>> 
at
>> 
>>> java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlocki
ngQueue.java:176)
>>>
>>> 
at
>> 
>>> java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.j
ava: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.j
ava:1361)
>>>
>>> 
at
>> 
>>> org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPool
Executor.java:161)
>>>
>>> 
at
>> 
>>> org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPool
Executor.java:141)
>>>
>>> 
at
>>> org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.jav
a: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.parkAndCheckIn
terrupt(AbstractQueuedSynchronizer.java:836)
>>>
>>> 
at
>> 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(
AbstractQueuedSynchronizer.java:870)
>>>
>>> 
at
>> 
>>> java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(Abstra
ctQueuedSynchronizer.java:1199)
>>>
>>> 
at
>> 
>>> java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantL
ock.java:209)
>>>
>>> 
at
>>> java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:285
)
>>>
>>> 
at
>> 
>>> java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlocki
ngQueue.java:172)
>>>
>>> 
at
>> 
>>> java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.j
ava: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.j
ava:1361)
>>>
>>> 
at
>> 
>>> org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPool
Executor.java:161)
>>>
>>> 
at
>> 
>>> org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPool
Executor.java:141)
>>>
>>> 
at
>>> org.apache.tomcat.util.net.AprEndpoint.processSocket(AprEndpoint.jav
a: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
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVR37uAAoJEBzwKT+lPKRYvS8P/14lHaikJZc2laMKDIZI4JIb
beYklkmTjG2JSJiYmpT624LKHUPH86APRaBbeU/89BWPfmu/fy3q8Ho+RHsaaIij
JppPlPl/A3kKPxkG8ptUws85WAXQpMD9VodhHOiJLJO/Tk7+kCiLTM0cQ+1d8iDE
KDNHS8YWzo0LPTnrvGn0evHWAKptfxmMxPMpDXwckcvIsKJMa3zI7jfcPQ5wQuv2
X6sTjnRp5Gxqaypx5ZY/JiLmS+SIzUdyAP4oVSa3pJ1hU4XJbXDfU9hj4+tjxMOm
N+eGB8M7AtLSLIommBmtJJjTeZHtjbQiOLsHUD9CIIN/OqjU2CHgmynKcWK1+/TD
j3TMQ8kJjGsXD/fqq4diKs8e1G3btTcIkUZWMlMw/cG10sUkono6vsmqJkUZ2XhE
yCmMii+vPSfamX+biitD3noH6EqP39utHVWyeE2+cuBRcfW8H83OEM3TNKzZfdcI
XbwKiPpEEoWJjMjyMyX0dLKLYq+Z7obldJlknQommTaZePhkPf3+Ykuyfbd+ckLi
6CVcH47ED+EaFswHc5Ik8l0/4SCSJkWBTiYKpUSSu9FAIFM1VRywQY6CMv9IhTJm
12+ow0MEtEQXy6yy6kw77jpNm8+xUf4Y+Fpv7O7j1BuJp84VR23znuANnzYjj0uq
0d0+Q08YRHrkYMHfC4ya
=fZkm
-----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