默认情况下tomcat可以处理多少个并发请求 [英] How many concurrent request can tomcat handle by Default

查看:2244
本文介绍了默认情况下tomcat可以处理多少个并发请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Tomcat7.0.42一次处理多少个请求。我们可以在任何外部File中配置相同的内容。如果是这样的话。

How many requests Tomcat7.0.42 handle at a time.Can we configure the same in any external File.If so where.

推荐答案

这取决于您用来接受请求的类型连接器。在 server.xml 中有一个名为 maxConnections 的参数,可配置为限制传入请求的数量。以下是 Tomcat 7的maxConnections参数说明

It depends on the type connector you are using to accept the requests. There is parameter called maxConnections in server.xml that can be configured to throttle the number of incoming requests. Here is the description of maxConnections params for Tomcat 7:


服务器将在任何给定时间接受的最大连接数和
进程。达到此数量后,
连接数将低于此值,
服务器将不再接受任何连接。操作系统仍然可以根据acceptCount设置接受
接受连接。默认值
因连接器类型而异。对于BIO,默认值是
maxThreads的值,除非使用Executor,在这种情况下默认值为
是执行程序中maxThreads的值。对于NIO,默认值为
10000.对于APR / native,默认值为8192.

The maximum number of connections that the server will accept and process at any given time. When this number has been reached, the server will not accept any more connections until the number of connections falls below this value. The operating system may still accept connections based on the acceptCount setting. Default value varies by connector type. For BIO the default is the value of maxThreads unless an Executor is used in which case the default will be the value of maxThreads from the executor. For NIO the default is 10000. For APR/native, the default is 8192.

请注意,对于Windows上的APR / native,配置的值将为
减少到1024的最大倍数,小于或等于
maxConnections。这是出于性能原因而完成的。如果设置为
值为-1,则禁用maxConnections功能并且不计算连接

Note that for APR/native on Windows, the configured value will be reduced to the highest multiple of 1024 that is less than or equal to maxConnections. This is done for performance reasons. If set to a value of -1, the maxConnections feature is disabled and connections are not counted

这篇关于默认情况下tomcat可以处理多少个并发请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆