Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HttpRequest maximum allowable size in tomcat?

Tags:

java

tomcat

What is the maximum data size I can send in a single HttpURLConnection to Tomcat? Is there any limitation for the request size?

like image 941
mabuzer Avatar asked Jun 01 '10 06:06

mabuzer


People also ask

How to set max POST size in Tomcat?

xml configuration file. By default Tomcat limits POST data to 2 MB. This limit can cause an issue when you use rule sets, which can post data greater than this limit. To disable the POST limit in Tomcat, you can add the maxPostSize="-1" attribute to the <Connector> element of the server.

How many requests can Tomcat handle?

The default installation of Tomcat sets the maximum number of HTTP servicing threads at 200. Effectively, this means that the system can handle a maximum of 200 simultaneous HTTP requests.

What is Tomcat Max thread?

By default, Tomcat sets maxThreads to 200, which represents the maximum number of threads allowed to run at any given time. You can also specify values for the following parameters: minSpareThreads : the minimum number of threads that should be running at all times.

What is Tomcat connector port?

Connector elements are Tomcat's links to the outside world, allowing Catalina to receive requests, pass them to the correct web application, and send back the results through the Connector as dynamically generated content.


1 Answers

You have to modify two possible limits:

In conf\server.xml

<Connector port="80" protocol="HTTP/1.1"                connectionTimeout="20000"                redirectPort="8443"                 maxPostSize="67589953" /> 

In webapps\manager\WEB-INF\web.xml

<multipart-config>   <!-- 52MB max -->   <max-file-size>52428800</max-file-size>   <max-request-size>52428800</max-request-size>   <file-size-threshold>0</file-size-threshold> </multipart-config> 
like image 163
Freeman Avatar answered Sep 28 '22 07:09

Freeman