简体   繁体   English

增加部署服务器的最大可能有效负载大小(通过 apache tomcat7 托管)

[英]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:我知道我的有效负载大小超过 2MB - Microsoft 在这里提到的默认限制:

https://support.microsoft.com/en-in/help/3104183/large-text-robjects-with-deployr-cause-script-to-fail 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.原来我所指的 Microsoft 链接有一个不完整的解决方案。

By default Tomcat limits POST data to 2 MB.默认情况下,Tomcat 将 POST 数据限制为 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.要在 Tomcat 中禁用 POST 限制,您可以将 maxPostSize="-1" 属性添加到 server.xml 配置文件的元素中。

The element will look something like this in your server.xml该元素将在您的 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.您还需要配置 context.xml 和 web.xml 文件,以使 server.xml 中的更改生效。

Update the element to include a reloadable="true" attribute in the context.xml file.更新元素以在 context.xml 文件中包含 reloadable="true" 属性。 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.使用 web.xml 文件中值为 false 的新 init-param 元素更新 org.apache.jasper.servlet.JspServlet servlet。

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我找到解决方案的链接: https : //www.ibm.com/support/knowledgecenter/SS8S5A_7.0.9/com.ibm.curam.content.doc/install_DevelopmentEnvironment/t_install_post-installationconfigurationoftomcat.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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