Tuesday, June 4, 2013

Set the MaxRequestParamterCount Value

Error:
weblogic.utils.http.MaxRequestParameterExceedException
at weblogic.utils.http.QueryParams.checkLimit(QueryParams.java:52)
at weblogic.utils.http.QueryParams.getCurrentAndCheck(QueryParams.java:46)
at weblogic.utils.http.QueryParams.put(QueryParams.java:79)


Description:
The default value of MaxRequestParamterCount is 10,000, crossing which would cause a MaxRequestParameterExceedException

Solution:
1.We can apply patch 13656558 for version 10.3.6, but since it is a security patch it is not freely available
Instead we can upgrade our version to 10.3.6.0.4 by applying patch 16083651.
(patch 16083651already in itself includes the patch 13656558).

2. Follow Doc ID 1505598.1

The MaxRequestParamterCount can be set in 3 places:

    On the WebAppContainerMBean, which is under the DomainMBean and has domain wide effect.
    On the WebServerMBean, which is under ServerMBean and has effect on only JVM. 

    This overrides settings on the WebAppContainerMBean.
    On the VirtualHostMBean. Virtual hosts, like servers, are under DomainMBean. 

    This overrides settings on the WebAppContainerMBean.

Use WLST to set it
 

WebAppContainerMBean:

$ connect('<user>','<pwd>','<admin_url>')
$ edit()
$ startEdit()
$ cmo.getWebAppContainer().setMaxRequestParamterCount(1000)
$ save()
$ activate()
$ exit()

WebServerMBean:


$ connect('<user>','<pwd>','<admin_url>')
$ edit()
$ startEdit()
$ cd('Servers/<server-name>')
$ cmo.getWebServer().setMaxRequestParamterCount(1000)
$ save()
$ activate()
$ exit()

For VirtualHostMBean:
$ connect('<user>','<pwd>','<admin_url>')
$ edit()
$ startEdit()
$ cd('VirtualHosts/<virtualhost>')
$ cmo.setMaxRequestParamterCount(1000)
$ save()
$ activate()
$ exit()




I tried making the change in my 12.1.1.0.3 and it works fine.

Adminserver.log
####<Aug 21, 2013 10:45:03 AM IST> <Info> <Management> <****> <> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1377062103640> <BEA-000000> <Version: WebLogic Server 12.1.1.0.3 PSU Patch for BUG14736141 Mon Dec 17 02:10:51 MST 2012



cmd

D:\work\wls\wls12.1.1\user_projects\domains\base_domain\bin>setDomainEnv.cmd
D:\work\wls\wls12.1.1\user_projects\domains\base_domain>cd D:\work\wls\wls12.1.1
\wlserver_12.1\common\bin
D:\work\wls\wls12.1.1\wlserver_12.1\common\bin>
D:\work\wls\wls12.1.1\wlserver_12.1\common\bin>wlst.cmd
wls:/base_domain/config> connect('weblogic','welcome1','t3://localhost:8001')
wls:/base_domain/config> easeSyntax()
wls:/base_domain/serverConfig/Servers/m1/WebServer/m1>
wls:/base_domain/serverConfig/Servers/m1/WebServer/m1> edit
<function edit 3>
wls:/base_domain/edit> cd Servers
wls:/base_domain/edit/Servers> cd m1
wls:/base_domain/edit/Servers/m1> cd WebServer
wls:/base_domain/edit/Servers/m1/WebServer> cd m1
wls:/base_domain/edit/Servers/m1/WebServer/m1> startEdit ()  
Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
wls:/base_domain/edit/Servers/m1/WebServer/m1 !> cmo.getMaxRequestParamterCount()
10000
wls:/base_domain/edit/Servers/m1/WebServer/m1 !> cmo.setMaxRequestParamterCount(-1)
wls:/base_domain/edit/Servers/m1/WebServer/m1 !>ls
wls:/base_domain/edit/Servers/m1/WebServer/m1 !> ls
dr--   Targets
dr--   WebServerLog
-rw-   AcceptContextPathInGetRealPath               false
-rw-   AuthCookieEnabled                            true
-rw-   Charsets                                     null
-rw-   ChunkedTransferDisabled                      false
-rw-   ClientIpHeader                               null
-rw-   DefaultWebAppContextRoot                     null
-rw-   DeploymentOrder                              1000
-rw-   FrontendHTTPPort                             0
-rw-   FrontendHTTPSPort                            0
-rw-   FrontendHost                                 null
-rw-   HttpsKeepAliveSecs                           60
-rw-   KeepAliveEnabled                             true
-rw-   KeepAliveSecs                                30
-rw-   MaxPostSize                                  -1
-rw-   MaxPostTimeSecs                              -1
-rw-   MaxRequestParamterCount                      -1

wls:/base_domain/edit/Servers/m1/WebServer/m1 !> save
<function save 4>
wls:/base_domain/edit/Servers/m1/WebServer/m1 !> save ()
Saving all your changes ...
Saved all your changes successfully.
 

Reference:

Doc ID 1505598.1

3 comments:

Anonymous said...

We just went from 10.3 to 10.3.6.0.5 and we are seeing this issue. Then installed 10.3.6.0.6 and still see the issue. Set the settings you mentioned and still the same issue. Strange. We got back to 10.3 and it works fine. Any suggestions?

Anonymous said...

Nevermind, got it fixed. Didnt use the activate() function

xuanhathudong said...

Thanks for sharing, nice post!

- Máy đưa võng tự động hay vong dien tu dong là võng được gắn thiết bị có tính năng tự động dịch chuyển để tạo thành lực đưa mà không cần tác động của người dùng. Những lợi ích mà vong dien tu dong cho bé mang lại là vô củng thiết thực.
- Võng tự đưa hay may dua vong tu dong ngày càng trở thành 1 phần của các gia đình Việt, nhất là những nhà có trẻ nhỏ. Máy đưa võng hay may dua vong em be tự động nhỏ gọn, tiện lợi, tiết kiệm điện lại rất an toàn khi sử dụng cho trẻ.Võng tự động không những là phương pháp ru con thời hiện đại của các ông bố bà mẹ bận rộn, mà may dua vong còn là món quà tặng tuyệt vời cho bé yêu của bạn.
- Hiện nay trên thị trường có nhiều loại máy đưa võng cho em bé với giá cả và chất lượng khác nhau, việc lựa chọn sản phẩm máy đưa võng chất lượng, uy tín, giá cả hợp lý là quan tâm hàng đầu của các bậc phụ huynh. Với nhãn hiệu uy tín, sản phẩm vong ru tu dong cho be chất lượng và giá bán phải chăng, máy đưa võng tự động An Thái Sơn tự hào là địa chỉ bán máy đưa võng giá rẻ uy tín nhất cho bé.
- Những thực phẩm tốt cho mắt bé hay ăn gì tốt cho mắt bé, những cách chống nắng hiệu quả cho bé trong những ngày hè, ăn sữa chua đúng cách hay khi nào nên cho trẻ ăn sữa chua, nguyên nhân và cách trị chứng mất ngủ ở trẻ em hay bí quyết giúp bé ngủ ngon giấc giúp bé ngủ ngon hơn, chia sẻ các mẹ nguyên nhân và cách chữa trị bệnh rụng tóc ở trẻ em hay chị em phụ nữa lo lắng có nên uống collagen khi đang cho con bú, chia sẻ về Đông trùng hạ thảo và những cách chế biến đông trùng hạ thảo nguyên con

Bạn xem thêm bí quyết và chia sẻ kinh nghiệm làm đẹp:

Những thực phẩm giúp đẹp da tại http://nhungthucphamgiupda.blogspot.com/
Thực phẩm giúp bạn trẻ đẹp tại http://thucphamgiuptre.blogspot.com/
Thực phẩm làm tăng tại http://thucphamlamtang.blogspot.com/
Những thực phẩm giúp làm giảm tại http://thucphamlamgiam.blogspot.com/
Những thực phẩm tốt cho tại http://thucphamtotcho.blogspot.com/

Chúc các bé khỏe mạnh, mau ăn chóng lớn!