简体   繁体   中英

increase the maximum possible payload size for deployr server (hosted via apache tomcat7)

I have a service hosted by deployr. I am getting a connection reset by peer error. I know my payload size is above 2MB - the default limit as mentioned by Microsoft here:

https://support.microsoft.com/en-in/help/3104183/large-text-robjects-with-deployr-cause-script-to-fail

However, when I try to implement the above fix, the service becomes inactive and I am unable to login to the admin console even though the logs report that the service has started.

Turns out that the Microsoft link I was referring to had an incomplete solution.

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 element of the server.xml configuration file.

The element will look something like this in your server.xml

<Connector port="9080" maxThreads="150" minSpareThreads="25" 
maxSpareThreads="75" enableLookups="false" redirectPort="8443" 
acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" 
useBodyEncodingForURI="true" maxPostSize="-1" />

You need to configure your context.xml and web.xml file as well for the changes in server.xml to come in effect.

Update the element to include a reloadable="true" attribute in the context.xml file. For example:

<Context reloadable="true">

Update the org.apache.jasper.servlet.JspServlet servlet with a new init-param element with the value false in the web.xml file.

For example:

<init-param>
<param-name>keepgenerated</param-name>
<param-value>false</param-value>
</init-param>

The link where I found the solution: https://www.ibm.com/support/knowledgecenter/SS8S5A_7.0.9/com.ibm.curam.content.doc/install_DevelopmentEnvironment/t_install_post-installationconfigurationoftomcat.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM