Wednesday, December 9, 2015

Performance tunning oracle application server iAS oc4j container iAS

Performance tunning  oracle application server iAS oc4j container iAS


You can improve performance by setting the minimum heap size equal to the maximum heap size. To do this set the option -Xms size to be the same as the -Xmx size. This measure will ensure that the container picks up all the heap size during initialization and dows not have to optimize during the run, which can cause performance degrade.

Apply the JVM options: -verbose:gc -XX:+PrintGCDetails this will give us more insight into GC behaviour, (there will be excess logging).

The -XX:+AggressiveHeap option tunes internal VM parameters to be optimal for long-running, memory-intensive workloads. This option should  follow, on the command line, the heap sizing options -Xms and -Xmx.

After the above steps, set the -XX:+DisableExplicitGC to avoid explicit GC and observe the gc behaviour.


To obtain better performance in your application, by lowering the overhead of creating and recreating database connections, specify the connection pool min-connections attribute to set the minimum number of connections that the connection pool maintains. Find out how many max connections has DB allowed to connect to middleware on a busy day (V$ session and its status - active).
Set the "minimum number of connections" to value of 4th step as a test measure. (setting this value can also have a disadvantage- in case you would like to start mw with the DB being down, you would not be able to as mw will look for minimum vale before it initializes).

To improve performance, you can set the inactivity-timeout to a value that allows the connection pool to avoid dropping and then reacquiring connections while your J2EE application is running. To improve performance, I recommend that you increase the inactivity-timeout to 120 seconds.
If you see that the number of database connections grows and then shrinks during an idle period, and grows again soon after that, you can increase the min-connections.
Continue with the maximum number of connections = -1


Let us increase the MaxClients directive in the httpd.conf file up to a value of 1000 (default is 150). If your system is not resource-saturated and you have a user population of more than 150 concurrent HTTP connections, you can improve your performance by increasing MaxClients to increase server concurrency. We can go all the way upto 8000 if needed.

If the user's load is all OC4J requests, that is, Oracle HTTP Server serves up little or no content and serves just as a front end for OC4J, then it is a good idea to set Oc4jCacheSize equal to ThreadsPerChild. This setting provides a dedicated connection per thread, if needed, and should give the best performance. Else leave it as default which is 1.

Enable statement caching to lower the overhead of repeated cursor creation and repeated statement parsing and creation by setting the num-cached-statements attribute to a value greater than 0. The number you set for num-cached-statements should be the number of SQL statements that you use in your application. (Get this data from application team).


You need to assure that application and server logging levels are set appropriately, and that debugging properties or other application level debugging flags are set to appropriate levels or disabled. Set Oracle Application Server OC4J logger log levels to log messages at the INFO level (do not set log levels to levels that produce more diagnostic message, including the FINE or TRACE levels).


We can get into threadpool tunning if you have hardware restrictions, else there is no need. this is in case of frequent cpu spike or your users have reported poor response time from application.

If you face hung thread issues and you are on jdk 5.0, under some circumstances under heavy load, synchronization in an application can result in thread starvation. please check if you face hung threads often.


You may add the below as –D option in the startup parameters of opmn.xml file of the respective managed server on which JMS queue are created, the debug logs will help you with jms related debugging.


Wednesday, May 20, 2015

Sponge cake recipe

1 cup maida, 1 cup sugar, 1cup oil or 250gm sugar, 3 eggs, 1spn essence, baking soda, 5 spoon honey.
Mix eggs sugar & beat for 10mins, add maida, soda, essence & beat, add oil & beat for 20mins.
Select an aluminum vessel and coat the interiors with butter. 
Pour the mix in an aluminum vessel and cover it partially, (we need to ensure air passes freely)
30min in sim flame, add raisins at about 20min. 

Monday, April 6, 2015

create auto login to windows RDP

To create Auto / Automatic / automate RDP (remote desktop) login in windows machines:

Open cmd (command prompt)
cmdkey /generic:"<ip>" /user:"<domain\user>" /pass:"<password>"
below is an example
cmdkey /generic:"" /user:"D3\adm_dummy" /pass:"abcd1234"

Then open a notepad and type (example)
mstsc /v
save as - 123.bat
save as type - all files

now you can place 123.bat in startup or run it manually to autologin to remote desktop

Sunday, February 15, 2015

Failed deployment on GRC (Oracle Governance, Risk, and Compliance Management)

Configuration :
GRCC application (Oracle Governance, Risk, and Compliance Management) on WLS 10.3.5 on linux6 (GRC connects directly to db does not use WLS Datasource, because it can be deployed on any container) 

Error :
Applicaiotn failed with error
<Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'grc'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "OHWServlet" failed to preload on startup in Web application: "grc".
java.lang.IllegalStateException: unable to create global configuration:unable to create global configuration
        at Source)
        at weblogic.servlet.internal.StubSecurityHelper$
Found the below configuration under */middleware/grc864_2242/grc/WEB-INF/web.xml


Solution :
renamed grcc folder which was deployment path in console.
created a new folder gave <chmod 777 grc864_2242> permission
copied the ear to the folder and unzipped it <unzip grcc.ear>
deployed in nostage mode, restarted jvm.
accessed url as http://ip:port/grc
Provided db details on the form and initialised the application.
But application could not initialise after 78% 

Error :
(..grc864_2242/grc/log/grc.log) in grc.log file of application found that application is trying to make db connection and after 2 min receiving connection reset on socket write.

2015-02-12 12:14:52,649 DEBUG [el.Default (self-tuning)'] DataSource:1112 connection string generated: jdbc:oracle:thin:@server:port:GRCM
2015-02-12 12:14:52,651 DEBUG [el.Default (self-tuning)'] DBConfigService:430 Connection URL: jdbc:oracle:thin:@server:port:GRCM
2015-02-12 12:14:52,759 DEBUG [el.Default (self-tuning)'] GrcSchema:68 canConnectToDb = true
2015-02-12 12:14:52,828 DEBUG [el.Default (self-tuning)'] LandingServiceImpl:49 getDatabaseUpgradeJob
2015-02-12 12:14:52,977 ERROR [el.Default (self-tuning)'] ApplicationResourceRequestFilter:308 Connection reset Connection reset
        at weblogic.servlet.internal.ServletOutputStreamImpl.writeHeader(
        at weblogic.servlet.internal.ResponseHeaders.writeHeaders(
2015-02-12 12:14:52,985 ERROR [el.Default (self-tuning)'] ApplicationResourceRequestFilter:308 Connection reset Connection reset

Solution :
Found at DB side that connections are at 49, while default DB connection in the grc form were 50.
redeployed the application and restarted jvm and increased db connections to 150 set
gave below values in grc form and issue was resolved.

refer : grc864_2242/grc/WEB-INF/conf/ = */oracle/middleware/grc_reports = */oracle/middleware/tcg_reports
grc.etl.home.path = */oracle/middleware/tcg_reports
app.server.library.path = */oracle/middleware/grc864_2242/grc/WEB-INF/lib
db conn : 150