{"id":5814,"date":"2013-06-01T23:12:41","date_gmt":"2013-06-01T23:12:41","guid":{"rendered":"https:\/\/gja.rfl.mybluehost.me\/website_fd74af1b\/troubleshooting-out-of-memory-issues-in-webcenter\/"},"modified":"2026-03-04T19:10:02","modified_gmt":"2026-03-04T19:10:02","slug":"troubleshooting-out-of-memory-issues-in-webcenter","status":"publish","type":"post","link":"https:\/\/onwardpath.com\/intelligence\/troubleshooting-out-of-memory-issues-in-webcenter\/","title":{"rendered":"Troubleshooting Out of Memory issues in WebCenter"},"content":{"rendered":"\n<p class=\"\">Troubleshooting Out of Memory issues in Oracle Fusion Middleware applications requires planning and patience. It is similar to looking for a needle in a haystack. &nbsp;The approach should be to monitor, gather data and then analyze the data to determine the root cause. Out of &nbsp;Memory can be caused by the code that is deployed on to the middleware infrastructure, &nbsp;or there may be an underlying issue with the Fusion Middleware infrastructure (Framework\/Cache issues). This post outlines the approach to understanding the problem and identifying the root cause for the OOM issues along with commands that can assist with the data gathering and analysis of OOM.<\/p>\n\n\n\n<p class=\"\">There are different types of Out of Memory issues. The following are some of the most common types:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"\">java.lang.OutOfMemoryError: requested XXXX bytes for Chunk::new. Out of swap space?<\/li>\n\n\n\n<li class=\"\">java.lang.OutOfMemoryError: unable to create new native thread<\/li>\n\n\n\n<li class=\"\">java.lang.OutOfMemoryError: PermGen space<\/li>\n\n\n\n<li class=\"\">java.lang.OutOfMemoryError: allocLargeObjectOrArray<\/li>\n\n\n\n<li class=\"\">java.lang.OutOfMemoryError: getNewTla<\/li>\n\n\n\n<li class=\"\">java.lang.OutOfMemoryError: Java Heap Space<\/li>\n\n\n\n<li class=\"\">java.lang.StackOverflowError<\/li>\n<\/ol>\n\n\n\n<p class=\"\"><b>1. Determine if your managed servers is reporting OOM:<\/b><\/p>\n\n\n\n<p class=\"\">Go to the managed servers location and execute find command to locate files with OOM exceptions logged<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\ncd \/Oracle\/Middleware\/user_projects\/domains\/mydomain\/servers\nfind .\/ -type f -exec grep -l java.lang.OutOfMemoryError {} \\;\n<\/strong><\/pre>\n\n\n\n<p class=\"\">An entry from a .log or .out file, is an indication that your managed server(s) is\/are reporting OOM. From the output, see which managed server is reporting OOM exceptions.&nbsp;For example, from the following output you can determine that WLS_Spaces1 is reporting OOM:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.\/WLS_Spaces1\/adr\/diag\/ofm\/webcenter_domain\/WLS_Spaces1\/alert\/log.xml\n.\/WLS_Spaces1\/logs\/<b>WLS_Spaces1.out00010<\/b><\/pre>\n\n\n\n<p class=\"\">Go to the log location of that managed server and execute find and print the line<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\ncd WLS_Spaces1\/logs\nfind .\/ -type f -exec grep java.lang.OutOfMemoryError {} \\;\n<\/strong><\/pre>\n\n\n\n<p class=\"\">Note: Your log location may be different based on your settings<\/p>\n\n\n\n<p class=\"\">From the output look for the lines that immediately follow the text <strong><i>java.lang.OutOfMemoryError<\/i><\/strong>. Pipe your output to more for convenience if required.<\/p>\n\n\n\n<p class=\"\">For example the following output suggests that this managed server is experiencing <strong><i>allocLargeObjectOrArray<\/i><\/strong> and <strong><i>getNewTla<\/i> <\/strong>OOM exceptions:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Exception in thread \"Thread-665\" java.lang.OutOfMemoryError: <b>allocLargeObjectOrArray<\/b>: [B, size 8208\nException in thread \"Thread-664\" java.lang.OutOfMemoryError: <b>allocLargeObjectOrArray<\/b>: [B, size 8208\nException in thread \"WsMgmtWorkScheduler\" java.lang.OutOfMemoryError: <b>getNewTla<\/b><\/pre>\n\n\n\n<p class=\"\"><b>2. Collect Thread and Heap Dumps<\/b><\/p>\n\n\n\n<p class=\"\"><b>Thread Dumps:<\/b><\/p>\n\n\n\n<p class=\"\">Thread dump is a snapshot of the state of all the threads that are in the process. To collect a thread dump, execute the following command every 5 seconds for 8 to 10 times:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;kill -3 &lt;PID&gt;<\/pre>\n\n\n\n<p class=\"\">Dumps will be written to the &lt;Server_Name&gt;.out file in the defined log directory (Ex: \/Oracle\/Middleware\/user_projects\/domains\/mydomain\/servers\/myserver\/logs).<\/p>\n\n\n\n<p class=\"\">OR<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;. .\/setDomainEnv.sh\n&gt;jrcmd &lt;pid&gt; print_threads &gt;tdump.txt<\/pre>\n\n\n\n<p class=\"\"><b>Heap Dumps:<\/b><\/p>\n\n\n\n<p class=\"\">Heap dump&nbsp;is a snapshot of the memory of a Java process at a certain point of time. To collect heap dumps execute the following command once.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt;\/&lt;Jrockit_home&gt;\/bin\/jrcmd &lt;PID&gt; hprofdump filename=heapdump.hprof<\/pre>\n\n\n\n<p class=\"\">Dump file will be written to the domain home (Ex: \/Oracle\/Middleware\/user_projects\/domains\/mydomain\/)<\/p>\n\n\n\n<p class=\"\"><b>GC Logs:<\/b><\/p>\n\n\n\n<p class=\"\">Enable GC tracing in the application server by including the following as a java startup parameter:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-Xverbose:gc -Xverbosetimestamp -Xverboselog:\/&lt;dir_name&gt;\/&lt;file_name&gt;<\/pre>\n\n\n\n<p class=\"\"><b>3. Analyze dumps&nbsp;<\/b><\/p>\n\n\n\n<p class=\"\"><b><b>Analyzing&nbsp;<\/b>Thread Dumps:<\/b><\/p>\n\n\n\n<p class=\"\">When your managed server is experiencing slow response or showing a health warning in the WebLogic admin console, run top to determine the process that is consuming high resource.<\/p>\n\n\n\n<p class=\"\">On the host that is running the managed server run top:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><b>top<\/b>\ntop - 16:26:55 up 584 days,&nbsp; 5:57,&nbsp; 4 users,&nbsp; load average: 4.96, 5.08, 5.10\nTasks: 167 total,&nbsp;&nbsp; 2 running, 165 sleeping,&nbsp;&nbsp; 0 stopped,&nbsp;&nbsp; 0 zombie\nCpu(s): 86.0%us,&nbsp; 0.5%sy, 13.5%ni,&nbsp; 0.0%id,&nbsp; 0.0%wa,&nbsp; 0.0%hi,&nbsp; 0.0%si,&nbsp; 0.0%st\nMem:&nbsp; 16436932k total, 15797128k used,&nbsp;&nbsp; 639804k free,&nbsp;&nbsp; 166504k buffers\nSwap: 12289684k total,&nbsp; 1662108k used, 10627576k free,&nbsp; 1229076k cached\nPID -- USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PR&nbsp; NI&nbsp; VIRT&nbsp; RES&nbsp; SHR S %CPU %MEM&nbsp;&nbsp;&nbsp; TIME+&nbsp; COMMAND\n<b>29381<\/b> oracle&nbsp;&nbsp;&nbsp; 15&nbsp;&nbsp; 0 4249m 3.0g&nbsp; 32m S 171.8 19.0 190:12.57 java\n21162 oracle&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp; 0 3499m 2.2g 4240 S 10.0 14.0 123:06.66 java\n21139 oracle&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp; 0 3450m 2.1g 7984 S&nbsp; 9.3 13.6 109:11.02 java\n21365 oracle&nbsp;&nbsp;&nbsp; 20&nbsp;&nbsp; 0 3196m 1.7g&nbsp; 16m S&nbsp; 7.0 10.9&nbsp; 80:56.99 java<\/pre>\n\n\n\n<p class=\"\">Note the PID of the process that is consuming high resources. In the above top output PID <b>29381<\/b> is our guy. Type q to quit out of top.<\/p>\n\n\n\n<p class=\"\">The JVM for Linux implements Java threads as native threads, which results in each thread being a separate Linux process. To determine the thread process that is consuming high resource, run top \u2013H \u2013b \u2013p &lt;PID&gt;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><b>top -H -b -p 29381 &gt;tophbp.txt<\/b>\n<b>CTRL+C<\/b>\n\n<b>vi tophbp.txt<\/b>\ntop - 16:25:21 up 584 days,&nbsp; 5:55,&nbsp; 4 users,&nbsp; load average: 4.96, 5.17, 5.14\nTasks: 129 total,&nbsp;&nbsp; 3 running, 126 sleeping,&nbsp;&nbsp; 0 stopped,&nbsp;&nbsp; 0 zombie\nCpu(s):&nbsp; 2.5%us,&nbsp; 0.4%sy,&nbsp; 9.8%ni, 86.1%id,&nbsp; 0.9%wa,&nbsp; 0.1%hi, &nbsp;0.2%si,&nbsp; 0.0%st\nMem:&nbsp; 16436932k total, 15794704k used,&nbsp;&nbsp; 642228k free,&nbsp;&nbsp; 165840k buffers\nSwap: 12289684k total,&nbsp; 1662108k used, 10627576k free,&nbsp; 1228912k cached\nPID -- USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PR&nbsp; NI&nbsp; VIRT&nbsp; RES&nbsp; SHR S %CPU %MEM&nbsp;&nbsp;&nbsp; TIME+&nbsp; COMMAND\n<b>29876<\/b> oracle&nbsp;&nbsp;&nbsp; 25&nbsp;&nbsp; 0 4248m 3.0g&nbsp; 32m R 77.0 19.0&nbsp; 61:41.25 [STANDBY] Execu\n29389 oracle&nbsp;&nbsp;&nbsp; 16&nbsp;&nbsp; 0 4248m 3.0g&nbsp; 32m R 55.3 19.0&nbsp; 24:15.73 (Code Optimizat\n29449 oracle&nbsp;&nbsp;&nbsp; 18&nbsp;&nbsp; 0 4248m 3.0g&nbsp; 32m R 43.4 19.0&nbsp; 61:51.18 [STANDBY] Execu\n29381 oracle&nbsp;&nbsp;&nbsp; 15&nbsp;&nbsp; 0 4248m 3.0g&nbsp; 32m S&nbsp; 0.0 19.0&nbsp;&nbsp; 0:00.00 java<\/pre>\n\n\n\n<p class=\"\">Note the thread process id that is consuming high resource. In the above top output PID <b>29876<\/b> should be our interest.<\/p>\n\n\n\n<p class=\"\">Export domain variables and collect thread dumps for the managed servers java process (use jcmd command if you are using SUN Java)<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\ncd \/Oracle\/Middleware\/user_projects\/domains\/mydomain\/bin\n. .\/setDomainEnv.sh\ncd ~\/\njrcmd 29381 print_threads &gt;tdump.txt\n<\/strong><\/pre>\n\n\n\n<p class=\"\">Examine the thread dump file to look for the thread process id<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><b>vi tdump.txt<\/b>\n\"[STUCK] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'\" id=134 \nidx=0x200 <strong>tid=29876<\/strong> prio=1 alive, native_blocked, daemon\nat java\/util\/HashMap.buildCache(HashMap.java:589)\nat java\/util\/HashMap.resize(HashMap.java:576)<\/pre>\n\n\n\n<p class=\"\">Note: <i>If you are using SUN Java you need to convert the thread pid to hex using the following command. If you are using JRockit this is not required<\/i><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong><i>printf \"%x \\n\" &lt;thread_pid&gt;<\/i><\/strong><\/pre>\n\n\n\n<p class=\"\">In the above example, it was HashMap.buildCache that was causing issues. However if you have a faulty code that is leaking memory, you now have a clue to the same. You can now go and examine the referenced code in JDeveloper to further investigate. When you open a Support Ticket with Oracle Support, providing the Heap and Thread Dumps along with the top output, would further assist the support engineers in determining the root cause of the issue.<\/p>\n\n\n\n<p class=\"\">Thread Deadlock is another situation contributing to OOM. If you suspect a deadlock, you can feed your thread dump to a Thread Dump Analyzer such as <a href=\"http:\/\/samuraism.jp\/samurai\/en\/index.html\" target=\"_blank\" rel=\"noopener\">Samurai<\/a>  which can identify the deadlock.<\/p>\n\n\n\n<p class=\"\"><b>Analyzing Heap Dumps:<\/b><\/p>\n\n\n\n<p class=\"\">Use MTA to analyze your heap dumps to determine any leak suspects. You can select the Run Leak Suspect report to determine which object is consuming high heap memory.<\/p>\n\n\n\n<p class=\"\"><\/p>\n\n\n\n<p class=\"\">Here are nice articles that explain OOM:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"\"><a href=\"http:\/\/weblogic-wonders.com\/weblogic\/2010\/12\/30\/different-out-of-memory-issues\/\">Different Out Of Memory Issues<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Troubleshooting Out of Memory issues in Oracle Fusion Middleware applications requires planning and patience. It is similar to looking for a needle in a haystack. &nbsp;The approach should be to monitor, gather data and then analyze the data to determine the root cause. Out of &nbsp;Memory can be caused by the code that is deployed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4161,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[37,19],"tags":[43,44,45,46,47],"class_list":["post-5814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology-blog","category-webcenter","tag-fusion-middleware","tag-out-of-memory","tag-technology-blog","tag-webcenter","tag-weblogic"],"jetpack_featured_media_url":"https:\/\/onwardpath.com\/intelligence\/wp-content\/uploads\/2020\/09\/39-memory-issue.jpg","_links":{"self":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/5814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/comments?post=5814"}],"version-history":[{"count":2,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/5814\/revisions"}],"predecessor-version":[{"id":6913,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/posts\/5814\/revisions\/6913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/media\/4161"}],"wp:attachment":[{"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/media?parent=5814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/categories?post=5814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onwardpath.com\/intelligence\/wp-json\/wp\/v2\/tags?post=5814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}