Thanks a lot Mark for the reply.
Please bear with me for my follow up questions :)
Does the park state (in visual vm) depicts the connection is idle and
waiting for requests ?
I see all threads reaching to this stage and my tomcat stops accepting any
further requests
"http-nio-0.0.0.0-8080-exec-1357" - Thread t@80536
java.lang.Thread.State: WAITING
at jdk.internal.misc.Unsafe.park(Native Method)
- parking to wait for <b136c19> (a
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at sun.misc.Unsafe.park(Unsafe.java:1079)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
at
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:103)
at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:31)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:836)
Also one general question : Isn't the persistent connection mechanism
counter productive with nio handling ?
Because i will be never able to achieve high throughput if persistent
connections are established.
Only way for me to achieve is to increase the number of threads.
We have 8G instances for 200 threads. I don't know how many threads we can
scale up to.
Best Regards,
Saurav
On Mon, Dec 3, 2018 at 4:14 PM Mark Thomas <[email protected]> wrote:
> On 03/12/2018 09:24, Saurav Sarkar wrote:
> > Hi All,
> >
> > I want to know the connector's protocol which is being used in my tomcat
> 8
> > container and clear the behaviour of request handling
> >
> > We have a cloud foundry based application running on java build pack.
> >
> > Below is the connector settings in server.xml
> >
> > <Connector port="${http.port}"
> >
> > bindOnInit="false"
> >
> > compression="on"
> >
> >
> >
> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json"
> >
> > allowTrace="false"
> >
> > address="${connector.address}"
> >
> > maxHttpHeaderSize="8192"
> >
> > maxThreads="200"
> >
> > server="tomcat" />
> >
> >
> > It does not show any connector details.
> >
> >
> > My thread dumps shows http-nio-exec threads and reaches to maximum of 200
> > threads.
> >
> >
> >
> > Does that mean Nio connector is used ?
>
> Yes.
>
> > But i am not able to address more than 200 threads . I understand that if
> > Nio connector is used then maxThreads values be ignored and i can at
> least
> > accept more requests.
>
> maxThreads is not ignored in your configuration.
>
> That configuration will support a maximum of 200 concurrent requests and
> 10000 concurrent connections.
>
> Note that with HTTP keep-alive connections are often idle (not currently
> processing request) so concurrent connections > concurrent requests.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>