是否有POST数据的Web应用程序服务器上的最大尺寸的限制?(Is there a restrict

2019-10-18 03:10发布

在我的web应用程序有哪些可以包含大量的数据(这取决于上一个查询的结果)的形式。 当窗体达到一定尺寸时,servlet不能应付和则抛出异常。 看来,获取请求参数的第一次尝试导致该问题。

我试图重现我的测试服务器上的问题,但即使在数据大小比在生产服务器上更大的不明白的问题。

其结果是,我现在想知道如果有一个服务器设置其限制了可以在一个请求中传递数据的大小。 我只能假设有在2台服务器的配置方式的差异。

应用服务器的Websphere 7.我一直在使用IE9,目前FF和电流Chrome尝试应用 - 都产生相同的结果。

唯一的例外是

java.lang.IllegalArgumentException
com.ibm.wsspi.webcontainer.util.RequestUtils.parseQueryString 196
com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData 356
com.ibm.ws.webcontainer.srt.SRTServletRequest.parseParameters 2051
com.ibm.ws.webcontainer.srt.SRTServletRequest.getParameter 1651
com.acme.Servlet.getNDC 126
com.acme.Servlet.doPost 96
javax.servlet.http.HttpServlet.service 738
javax.servlet.http.HttpServlet.service 831
com.ibm.ws.webcontainer.servlet.ServletWrapper.service 1658
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest 940
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest 503
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest 181
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest 91
com.ibm.ws.webcontainer.WebContainer.handleRequest 875
com.ibm.ws.webcontainer.WSWebContainer.handleRequest 1592
com.ibm.ws.webcontainer.channel.WCChannelLink.ready 186
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination 453
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest 515
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest 306
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete 83
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted 165
com.ibm.io.async.AbstractAsyncFuture.invokeCallback 217
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions 161
com.ibm.io.async.AsyncFuture.completed 138
com.ibm.io.async.ResultHandler.complete 204
com.ibm.io.async.ResultHandler.runEventProcessingLoop 775
com.ibm.io.async.ResultHandler$2.run 905
com.ibm.ws.util.ThreadPool$Worker.run 1646

编码

protected String getNDC(HttpServletRequest request)
{
    String user = request.getHeader("iv-user");
    if (user == null)
        user = "";
    HttpSession session = request.getSession(false);
    String sessionString = session == null ? "" : session.getId();
    String action = request.getParameter(Constant.ACTION);   <=== ERROR HERE
    if(action == null)
        action = "";
    ....

Answer 1:

POST数据大小可以通过在HTTP信道配置的设置来限制:

http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.express.doc/info/exp/ae/urun_chain_typehttp.html

如果在的WAS前一个Web服务器,那么你也应该检查PostSizeLimit在插件配置属性:

http://www-01.ibm.com/support/docview.wss?uid=swg21460889



Answer 2:

似乎是有限制的 - 至少在WebSphere应用服务器。 下面是来自IBM的响应...

我检查了您的问题说明。 你说得对,为7具有的允许入站请求参数最大数号码,但数量是非常高的,它是GET和POST请求10000。 如果你不希望限制可包含在您必须设置“com.ibm.ws.webcontainer.maxParamPerRequest” Web容器定制属性设置为-1,详见“Web容器自定义属性”的请求参数的数量 - http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-dist&topic=rweb_custom_props



文章来源: Is there a restriction on the maximum size of post data on a web application server?