WebCenter Portal defines default parameters for portlets usage, which are very well suited for most of the cases. If the portal is under high load or performance test, portlets consumed from the portal could throw intermittently unavailable exceptions. In the portal log error message states that the queue is full and the pool is not able to operate new request. Fortunately there is a possibility to modify the default portlet queue size according to your needs within the portal configuration.
Under high load you could experience following message within the portal logs:
Message oracle.portlet.client.container.PortletQueueFullException: Queue Full [cause=na submittedTasks=8,361 queuedTasks=20 queueFreeSpace=0 completedTasks=8,331 activeThreads=10 corePoolSize=10 keepAliveTime=9,223,372,036 largestPoolSize=10 maxPoolSize=10 poolSize=10 isShutdown=false isTerminated=false isTerminating=false]
Supplemental Detail at oracle.portlet.client.service.pipeline.PipeContext.doQueue(PipeContext.java:1045)
The above message states that the queue size for the portlets is full. This also means that no new portlet request will be processed. WebCenter Portal defines the portlet client queue size within adf-config.xml file, with following two parameters: parallelPoolSize and parallelQueueSize.
parallelPoolSize: Default value 10 - The number of threads to use for parallel execution of tasks.
parallelQueueSize: Default value 20 - The size of the queue of tasks waiting for parallel execution. Tasks are rejected once the queue size is exceeded.
In case that there are more then the default 20 parallel request from WebCenter Portal to the portlets, some request will be blocked, which results to unavailability of the portlet. To fix this issue, the queue size should be increased. Also to boost portlet performance you could also increase the parallel pool size, which will increase the number of threads opened to handle the portlet request from the queue.
Increasing the queue and pool size should be done carefully and in small portions. Even if there is no hard limitation using too high value could end with increase usage of hardware resource, which is counterproductive.
Note that there is no lazy load approach when you increase the pool size. For example if you use value of 50, the portal opens immediately 50 threads ready to handle portlet request and the threads will stay open. Knowing this you should carefully select the pool size value. You can run several performance and last tests, and monitor the load for example with JRockit Mission Control to identify the best possible value.
Change the default portlet setting within WebCenter Portal Framework
To change the default portlet setting in WebCenter Portal Framework you modify and add following two parameters within the adf-config.xml configuration file under the adf-portlet-config section:
The adf-portlet-config section should look like this:
<portlet:adf-portlet-config xmlns="http://xmlns.oracle.com/adf/portlet/config"> <parallelPoolSize>40</parallelPoolSize> <parallelQueueSize>40</parallelQueueSize> <cacheSettings enabled="true"> <maxSize> 10000000 </maxSize> </cacheSettings> <cacheSettings> <maxSize> 10000000 </maxSize> <subscriber default="true"> <systemLevel> <maxSize> 5000000 </maxSize> </systemLevel> <userLevel> <maxSize> 8000000 </maxSize> </userLevel> </subscriber> </cacheSettings> <defaultTimeout> 20 </defaultTimeout> <minimumTimeout> 1 </minimumTimeout> <maximumTimeout> 60 </maximumTimeout> <applicationStriping> false </applicationStriping> </portlet:adf-portlet-config>
Change the default setting within WebCenter Portal
To change the default setting within WCP you should modify the adf-config configuration but with different approach. Since you do not have access to the configuration file, you have the possibility to export it, modify it and then import it back to the portal. Another way to proceed with the change is through the EM changing the configuration directly through the MBean browser.
Make MDS Label before proceed with the change. This will give you the opportunity to recover to the previously state, if needed. For more information about managing WebCenter MDS read following blog post: Helpfull tips for managing the WebCenter MDS repository
In order to change the portlet queue or pool size from the MBean browser, open the EM and login as administrator. Select the WebCenter application and then the MBean browser. From the MBean tree go to Application Defined MBeans -> oracle.adf.share.config -> Server:<server_name> -> Application: webcenter -> ADFConfig -> ADFConfig
and click on the PortletConfiguration. This will give you access to the portlet configuration settings within the adf-config from WebCenter Portal as shown on the screen shot bellow:
Change the values and click on Apply to save.
Use WebCenter Custom WLST Commands
Another more elegant way to change the settings is using WLST command called setPortletClientConfig. For more information about the available commands read the WebCenter Portal Custom WLST Commands Guide.
On your admin server open command line mode and go to the FMW installation folder and then under: <FWM>/Oracle_WC1/common/bin
Execute the wlst.sh script. This will give you access to the WebCenter Custom WLST Commands.
To use the WebCenter WLST Commands you have to login to the WebLogic Server.
Execute the set portlet config command with the following parameter:
Note that when you try to execute the command you may get the message that your location is switched to domainRuntime. In that case you have to execute the command again. You can also first switch to domainRuntime and then execute the command.
It is important that you login to the Admin Server to be able to use the domainRuntime. You cannot use the domainRuntime when connect to Managed Server.
To check the changes use the listPortletClientConfig command:
This should produce following output:
After the change was made you must restart the managed servers.
You can setup more then one property at once, for more information follwo the WebCenter Custom WLST Commands Guide: http://docs.oracle.com/cd/E29542_01/web.1111/e13813/custom_webcenter_admin.htm