> On 2025 Aug 6, at 18:29, John Williams 
> <john.willi...@eginnovations.com.INVALID> wrote:
> 
> I have Tomcat 11 running on Windows. When I get a spurt of connections, the 
> client sees "Connection Refused" errors sporadically. I have tried increasing 
> the acceptCount for the connector and that does not help.
> 
> From what I am reading, this appears to be a because of the default TCP 
> Backlog setting at the OS level. Windows has this limit set to 200, so if 
> there are more than 200 simultaneous connection attempts, some connections 
> get refused.
> 
> I have verified that there is no CPU/memory bottleneck on the server, 
> ephemeral port usage is very low, so this is definitely a TCP backlog issue. 
> 
> On Windows, there appears to be a way to increase the TCP backlog queue - see 
> https://lists.apache.org/thread/bg65sgvxr8rghzb9ybzbd15ctb568562. This 
> setting is at the socket level, rather than an OS setting.
> 
> Does Tomcat provide a way to increase the OS level TCP backlog queue length, 
> and if not, can this be considered in the roadmap? 
> 
> This seems to be a scalability issue for Tomcat - 200 concurrent connection 
> limit appears to be a very low number. Please correct me if I am wrong.


The backlog queue size is not the limit for the number of concurrent 
connections - they are distinct entities. A connections request sits in the 
backlog queue until the server accepts it, which usually occurs extremely 
quickly - unless the actual concurrency limit as specified in your <Connector> 
element has been reached. The backlog limit only comes into play if Tomcat 
cannot accept additional connections for some reason, such as the thread limit 
being reached.

Since you didn’t provide your Tomcat <Connector> configuration, no actual 
answers can be provided - just speculation.

  - Chuck


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

Reply via email to