Rejecting request since max request parameter limit exceeded 10000

来源:互联网 发布:mac版steam游戏 编辑:程序博客网 时间:2024/06/05 02:44

参考:https://community.oracle.com/thread/3573070

https://my.oschina.net/farces/blog/911850


Which WLS version?

 

1)-Dweblogic.utils.http.maxParameters=XXXX

      This is required, and can be set by by commandline as above or by wlst (see script example below). The "xxxx" is the limit of allowed parameters in a Http request.Recommended value is 10000. A higher value would allow a requestto have more parameters but risks the server to slow down serving other requests.

 

WLST script to set the "weblogic.utils.http.maxParameters" as below

 

connect("<AdminuserName>","<adminuserPassword>", "t3://host>:<port>")

edit()

startEdit()

cd('Servers/<yourServerName>/WebServer/<yourServerName>')

cmo.setMaxRequestParamterCount(10000)

save()

activate(block="true")

exit()

 

Note: change the parameters inside "<>" to match your environment


近期遇到的request请求参数过多,导致系统报错的问题:

通过修改weblogic 11G参数解决,见红色字体:

set JAVA_PROPERTIES=-Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% -Dweblogic.utils.http.maxParameters=20000 -Dweblogic.Chunksize=65536 -Dweblogic.utils.io.chunkpoolsize=65536


以上方式如不生效,可使用以下方式设置:

进入WEBLOGIC安装目录:/opt/Oracle/Middleware/wlserver_10.3/common/bin
执行脚本 ./wlst.sh (windows是wlst.cmd)
然后执行以下方法:
connect("username","password","t3://127.0.0.1:7001")
edit()
startEdit() 
cd('Servers/serverName/WebServer/serverName')
cmo.setMaxRequestParamterCount(50000) 
save()
activate(block="true")
exit()
--经测试,以上方法执行的有效。
--此方法适用于Weblogic 10.3.6.0.12.0及以上版本。
特别注意:未打漏洞补丁的版本Weblogic 10.3.6.0无此问题,执行此脚本会出错



个人虽然是weblogic12.1.3,上面的方法不行,下面的方法 测试可行。大家碰到了,可以类似处理

C:\Oracle\Middleware\Oracle_Home\wlserver\common\bin

wlst.cmd

connect("weblogic","weblogic123","t3://127.0.0.1:7001")
edit()
startEdit() 
cd('Servers/AdminServer/WebServer/AdminServer')
cmo.setMaxRequestParamterCount(50000) 
save()
activate(block="true")
exit()