Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a webSocket server which is runnnig on Tomcat.

When the client open a web socket connection, this connection corresponds with one thread from Tomcat pool?

I mean when I have 200 clients then thread pool in Tomcat which is default 200 will be busy ?

What I have tried:

Try to find information on the internet.
Posted
Updated 26-May-20 16:02pm

1 solution

I think, short answer 'yes', long answer, look here Key metrics for monitoring Tomcat | Datadog[^] at the notes under 'Requests and worker Threads' particularly
Quote:
Upon startup, Tomcat will create threads based on the value set for minSpareThreads and increase that number based on demand, up to the number of maxThreads. If the maximum number of threads is reached, and all threads are busy, incoming requests are placed in a queue (acceptCount) to wait for the next available thread. The server will only continue to accept a certain number of concurrent connections (as determined by maxConnections). When the queue is full and the number of connections hits maxConnections, any additional incoming clients will start receiving Connection Refused errors. If your server begins generating these errors, you will need to adjust your connectors’ thread pool capacity to better accommodate the number of incoming requests.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900