Re: High CPU Consumption with Tomcat 8.5.4 NIO and SSL

2016-08-30 Thread Rémy Maucherat
2016-08-30 15:31 GMT+02:00 Mark Thomas :

> On 30/08/2016 14:27, Rémy Maucherat wrote:
> > 2016-08-30 15:22 GMT+02:00 Mark Thomas :
> >
> >> Either or both of these:
> >> http://bz.apache.org/bugzilla/show_bug.cgi?id=60030
> >>
> > I wasn't 100% sure NIO2 wasn't affected by the SNI IO loop, but it does
> > fine then reading his email.
>
> It isn't. The issue the OP observed with NIO2 were different. They might
> be related to https://bz.apache.org/bugzilla/show_bug.cgi?id=59832
>
> We'll see about other issues when they are identified, I was specifically
interested in knowing if 60030
 applied. So it
doesn't.

Rémy


Re: High CPU Consumption with Tomcat 8.5.4 NIO and SSL

2016-08-30 Thread Mark Thomas
On 30/08/2016 14:27, Rémy Maucherat wrote:
> 2016-08-30 15:22 GMT+02:00 Mark Thomas :
> 
>> Either or both of these:
>> http://bz.apache.org/bugzilla/show_bug.cgi?id=60030
>>
> I wasn't 100% sure NIO2 wasn't affected by the SNI IO loop, but it does
> fine then reading his email.

It isn't. The issue the OP observed with NIO2 were different. They might
be related to https://bz.apache.org/bugzilla/show_bug.cgi?id=59832

Mark


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



Re: High CPU Consumption with Tomcat 8.5.4 NIO and SSL

2016-08-30 Thread Rémy Maucherat
2016-08-30 15:22 GMT+02:00 Mark Thomas :

> Either or both of these:
> http://bz.apache.org/bugzilla/show_bug.cgi?id=60030
>
> I wasn't 100% sure NIO2 wasn't affected by the SNI IO loop, but it does
fine then reading his email.

Rémy


Re: High CPU Consumption with Tomcat 8.5.4 NIO and SSL

2016-08-30 Thread Mark Thomas
On 30/08/2016 14:11, Chen Levy wrote:
> Hello All
> 
> Since Tomcat 8.0.x development is about to be stopped, we’ve decided to 
> switch to 8.5.4, but since are facing the following issue:
> A few hours after startup, the Java process starts consuming 100% CPU, and 
> while Tomcat is still responsive, it is very slow. This is consistent, been 
> going on for a couple of weeks and is only resolved each time by restarting 
> Tomcat.



> I’ll appreciate any insight or advice

Either or both of these:
http://bz.apache.org/bugzilla/show_bug.cgi?id=60030
http://bz.apache.org/bugzilla/show_bug.cgi?id=60035

Mark


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



High CPU Consumption with Tomcat 8.5.4 NIO and SSL

2016-08-30 Thread Chen Levy
Hello All

Since Tomcat 8.0.x development is about to be stopped, we’ve decided to switch 
to 8.5.4, but since are facing the following issue:
A few hours after startup, the Java process starts consuming 100% CPU, and 
while Tomcat is still responsive, it is very slow. This is consistent, been 
going on for a couple of weeks and is only resolved each time by restarting 
Tomcat.

I’ve tried a few things:
Reverted back to Tomcat 8.0.33 -> problem solved
Switched from NIO to NIO2 -> problem solved, but other issues appeared with 
connections ending prematurely, so not a valid option
Switched to the new connector configuration scheme -> problem persists

Setup: 
Current Amazon Linux, Tomcat 8.5.4, Java 1.8.0_92-b14, no APR

  






Analyzing the threads, there’s one which takes all of the CPU time:

"https-jsse-nio-8443-ClientPoller-0" daemon prio=5 RUNNABLE
sun.misc.Unsafe.unpark(Native Method)
java.util.concurrent.locks.LockSupport.unpark(LockSupport.java:141)

java.util.concurrent.locks.AbstractQueuedSynchronizer.unparkSuccessor(AbstractQueuedSynchronizer.java:662)

java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1264)
java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:457)

java.util.concurrent.LinkedBlockingQueue.signalNotEmpty(LinkedBlockingQueue.java:176)

java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:430)
org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:74)
org.apache.tomcat.util.threads.TaskQueue.offer(TaskQueue.java:31)

java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1361)

org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:163)

org.apache.tomcat.util.threads.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:141)

org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:828)

org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:850)
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:826)
java.lang.Thread.run(Thread.java:745)


This is similar to an issue on a Windows machine reported here:
http://marc.info/?l=tomcat-user=147082413626214=2

I’ll appreciate any insight or advice
Thanks in advance
Chen