<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>KB-2288 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>KB-2288 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq</link><pubDate>Wed, 31 Jan 2024 06:17:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Maggie Deppe-Walker</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Current Revision posted to Appian Knowledge Base by Maggie Deppe-Walker on 1/31/2024 6:17:42 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/73</link><pubDate>Wed, 31 Jan 2024 06:16:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Maggie Deppe-Walker</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 73 posted to Appian Knowledge Base by Maggie Deppe-Walker on 1/31/2024 6:16:22 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h4 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/72</link><pubDate>Wed, 31 Jan 2024 06:15:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Maggie Deppe-Walker</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 72 posted to Appian Knowledge Base by Maggie Deppe-Walker on 1/31/2024 6:15:22 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h5 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h5 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/71</link><pubDate>Wed, 31 Jan 2024 06:11:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Maggie Deppe-Walker</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 71 posted to Appian Knowledge Base by Maggie Deppe-Walker on 1/31/2024 6:11:30 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;span style="font-size:inherit;"&gt;1.&lt;/span&gt; Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/70</link><pubDate>Wed, 31 Jan 2024 06:09:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Maggie Deppe-Walker</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 70 posted to Appian Knowledge Base by Maggie Deppe-Walker on 1/31/2024 6:09:29 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hku3fd2g0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;1. Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;2. An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:inherit;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/69</link><pubDate>Wed, 24 Jan 2024 21:24:36 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 69 posted to Appian Knowledge Base by Daniel DeVeau on 1/24/2024 9:24:36 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hku3fd2g0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating slowness related to garbage collection include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li&gt;Avoiding logic that operates on and/or iterates large arrays of texts or objects&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding additional filters and/or batching to problematic queries&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Any of the above recommendations to remediate slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/68</link><pubDate>Wed, 24 Jan 2024 21:11:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Kevin Kleinegger</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 68 posted to Appian Knowledge Base by Kevin Kleinegger on 1/24/2024 9:11:51 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hku3fd2g0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high volumes of work include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Avoid designing processes with large looping iterations&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters and/or batching to problematic queries&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/67</link><pubDate>Wed, 24 Jan 2024 16:11:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 67 posted to Appian Knowledge Base by Daniel DeVeau on 1/24/2024 4:11:16 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hku3fd2g0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is higher than garbage collection can keep up with, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running activity.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of this issue include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Large looping, text manipulation or array-based operations&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;"&gt;Inefficient application design and/or excessive volume of work&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Undersized heap memory allocation relative to the workload required&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Common causes of an&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;application server restart include:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Queries with large result sets&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Document generation using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Very large process variables or inputs&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Any of the above causes of slowness&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by user and process activity. Therefore, identifying and modifying the problematic activity is the primary solution for remediating performance issues involving heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of a high and/or excessively complex volume of work. The main troubleshooting steps are to identify the&amp;nbsp;implicated&amp;nbsp;activity using logs and &lt;a href="#What-is-a-heap-dump"&gt;heap dumps&lt;/a&gt;,&amp;nbsp;determine whether the load is expected/required, and action any opportunities for optimization.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high volumes of work include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/li&gt;
&lt;li&gt;Re-designing intensive processes to run gradually over a longer time frame&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Re-designing the application causing the excessive volume, starting with the most expensive operations&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Avoid designing processes with large looping iterations&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters and/or batching to problamatic queries&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Limiting the size of uploaded documents&amp;nbsp;before they are manipulated&lt;/span&gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/66</link><pubDate>Tue, 16 Jan 2024 05:53:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>saketh.darbhamulla</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 66 posted to Appian Knowledge Base by saketh.darbhamulla on 1/16/2024 5:53:47 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of this issue are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/65</link><pubDate>Tue, 16 Jan 2024 05:41:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>saketh.darbhamulla</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 65 posted to Appian Knowledge Base by saketh.darbhamulla on 1/16/2024 5:41:22 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of this issue are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/64</link><pubDate>Fri, 05 Jan 2024 17:23:48 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 64 posted to Appian Knowledge Base by Daniel DeVeau on 1/5/2024 5:23:48 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of this issue are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/63</link><pubDate>Fri, 05 Jan 2024 17:21:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 63 posted to Appian Knowledge Base by Daniel DeVeau on 1/5/2024 5:21:49 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of this issue are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/62</link><pubDate>Fri, 05 Jan 2024 17:21:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 62 posted to Appian Knowledge Base by Daniel DeVeau on 1/5/2024 5:21:27 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment can be caused by the garbage collection process running too often. This occurs when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long-running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/61</link><pubDate>Fri, 05 Jan 2024 17:19:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 61 posted to Appian Knowledge Base by Daniel DeVeau on 1/5/2024 5:19:23 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to performance issues when it occurs at a high frequency, which often indicates a problematic activity that is either processing too many objects in memory, processing objects that are too large, or both.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/60</link><pubDate>Fri, 05 Jan 2024 17:13:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 60 posted to Appian Knowledge Base by Daniel DeVeau on 1/5/2024 5:13:23 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are&amp;nbsp;many Appian components that allocate their own heap memory space. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to issues when there is a need for a high frequency&amp;nbsp;of garbage collections. This is where the garbage collection process runs intensely and continuously, causing general slowness across the environment since all&amp;nbsp;work in the application server&amp;nbsp;utilizes the heap memory.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/59</link><pubDate>Fri, 05 Jan 2024 04:12:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>saketh.darbhamulla</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 59 posted to Appian Knowledge Base by saketh.darbhamulla on 1/5/2024 4:12:52 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to issues when there is a need for a high frequency&amp;nbsp;of garbage collections. This is where the garbage collection process runs intensely and continuously, causing general slowness across the environment since all&amp;nbsp;work in the application server&amp;nbsp;utilizes the heap memory.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over an extended time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;January 2024&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/58</link><pubDate>Fri, 05 Jan 2024 04:08:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>saketh.darbhamulla</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 58 posted to Appian Knowledge Base by saketh.darbhamulla on 1/5/2024 4:08:39 AM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. If all the required objects to complete an item of work are in the heap memory, the work item will perform identically regardless of how much of the heap memory is utilized.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;High heap utilization, and consequently garbage collection events, are expected behavior and not indicative of any environment performance or configuration issues. Garbage collection can lead to issues when there is a need for a high frequency&amp;nbsp;of garbage collections. This is where the garbage collection process runs intensely and continuously, causing general slowness across the environment since all&amp;nbsp;work in the application server&amp;nbsp;utilizes the heap memory.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same. A large object or amount of objects is being loaded in the heap memory to be acted on that either exceeds the capacity of the heap memory, or prevents new objects from being introduced into the heap memory.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over a longer time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process Load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on their Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;December 2023&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/57</link><pubDate>Wed, 03 Jan 2024 22:12:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 57 posted to Appian Knowledge Base by Daniel DeVeau on 1/3/2024 10:12:53 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;le&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any process is run in your Appian Environment, the application server pulls all the objects referenced by the process from their storage on disk into the heap memory so the process can then be executed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. The more objects the application server is able to keep in memory, the faster it can perform work with those objects.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Appian designs the application server to run normally with high heap utilization as well to limit the amount of time spent on garbage collection, therefore reducing the impact of garbage collection on performance. Garbage collection can lead to issues when there is a need for multiple garbage collections in a short amount of time. This is where the garbage collection process runs intensely and continuously. Ordinarily, the garbage collection process is able to complete quickly without impacting the performance of the heap memory. However, when the garbage collection process runs intensely and continuously, the heap memory essentially freezes, causing general slowness across the environment since all processes utilise the heap memory. &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The determining factor for how the heap memory and garbage collection process behave in an application server is the process activity running in that application server. It can be related to process activity causing&amp;nbsp; difficulties with removing objects from the heap memory or with pulling new objects into the heap memory. When processes are efficiently designed and the heap memory is behaving normally, there will be no difficulties with moving objects in and out of the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same - a large object or amount of objects is being loaded in the heap memory to be acted on. In some cases these objects may need to be loaded into memory multiple times, creating further heap concerns. For instance, when manipulating bulky text which consumes a large portion of memory, any object that interacts with the text will also require the same amount of memory, exponentially increasing the used heap memory very rapidly if there are multiple objects involved in the same process.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over a longer time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process Load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Recommendations to increase heap memory allocated are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on the Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;December 2023&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/56</link><pubDate>Wed, 03 Jan 2024 22:11:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 56 posted to Appian Knowledge Base by Daniel DeVeau on 1/3/2024 10:11:42 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;le&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any process is run in your Appian Environment, the application server pulls all the objects referenced by the process from their storage on disk into the heap memory so the process can then be executed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. The more objects the application server is able to keep in memory, the faster it can perform work with those objects.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Appian designs the application server to run normally with high heap utilization as well to limit the amount of time spent on garbage collection, therefore reducing the impact of garbage collection on performance. Garbage collection can lead to issues when there is a need for multiple garbage collections in a short amount of time. This is where the garbage collection process runs intensely and continuously. Ordinarily, the garbage collection process is able to complete quickly without impacting the performance of the heap memory. However, when the garbage collection process runs intensely and continuously, the heap memory essentially freezes, causing general slowness across the environment since all processes utilise the heap memory. &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The determining factor for how the heap memory and garbage collection process behave in an application server is the process activity running in that application server. It can be related to process activity causing&amp;nbsp; difficulties with removing objects from the heap memory or with pulling new objects into the heap memory. When processes are efficiently designed and the heap memory is behaving normally, there will be no difficulties with moving objects in and out of the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same - a large object or amount of objects is being loaded in the heap memory to be acted on. In some cases these objects may need to be loaded into memory multiple times, creating further heap concerns. For instance, when manipulating bulky text which consumes a large portion of memory, any object that interacts with the text will also require the same amount of memory, exponentially increasing the used heap memory very rapidly if there are multiple objects involved in the same process.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over a longer time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment during peak usage. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process Load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Due to the complex nature of heap allocation and performance issues in Appian, recommendations on increases to the allocated heap memory are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will help improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on the Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;December 2023&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/55</link><pubDate>Wed, 03 Jan 2024 22:11:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 55 posted to Appian Knowledge Base by Daniel DeVeau on 1/3/2024 10:11:23 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;le&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any process is run in your Appian Environment, the application server pulls all the objects referenced by the process from their storage on disk into the heap memory so the process can then be executed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. The more objects the application server is able to keep in memory, the faster it can perform work with those objects.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Appian designs the application server to run normally with high heap utilization as well to limit the amount of time spent on garbage collection, therefore reducing the impact of garbage collection on performance. Garbage collection can lead to issues when there is a need for multiple garbage collections in a short amount of time. This is where the garbage collection process runs intensely and continuously. Ordinarily, the garbage collection process is able to complete quickly without impacting the performance of the heap memory. However, when the garbage collection process runs intensely and continuously, the heap memory essentially freezes, causing general slowness across the environment since all processes utilise the heap memory. &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The determining factor for how the heap memory and garbage collection process behave in an application server is the process activity running in that application server. It can be related to process activity causing&amp;nbsp; difficulties with removing objects from the heap memory or with pulling new objects into the heap memory. When processes are efficiently designed and the heap memory is behaving normally, there will be no difficulties with moving objects in and out of the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same - a large object or amount of objects is being loaded in the heap memory to be acted on. In some cases these objects may need to be loaded into memory multiple times, creating further heap concerns. For instance, when manipulating bulky text which consumes a large portion of memory, any object that interacts with the text will also require the same amount of memory, exponentially increasing the used heap memory very rapidly if there are multiple objects involved in the same process.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over a longer time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough memory available on the environment. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process Load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Due to the complex nature of heap allocation and performance issues in Appian, recommendations on increases to the allocated heap memory are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will help improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on the Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;December 2023&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item><item><title>DRAFT-SP-9359 Application Server Heap Memory FAQ</title><link>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq/revision/54</link><pubDate>Wed, 03 Jan 2024 22:10:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cc4000b9-e390-4feb-aeed-5e8ff04d98d1</guid><dc:creator>Daniel DeVeau</dc:creator><comments>https://community.appian.com/support/w/kb/3429/kb-2288-application-server-heap-memory-faq#comments</comments><description>Revision 54 posted to Appian Knowledge Base by Daniel DeVeau on 1/3/2024 10:10:28 PM&lt;br /&gt;
&lt;p&gt;Table of Contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#What-is-heap"&gt;What is heap?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-the-difference-between-heap-memory-and-total-memory"&gt;What is the difference between heap memory and total memory?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-garbage-collection"&gt;What is garbage collection?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#When-is-heap-usage-a-concern"&gt;When is heap usage a concern?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-are-some-common-heap-issues"&gt;What are some common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#How-to-fix-common-heap-issues"&gt;How to fix common heap issues?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;Will increasing the heap memory allocation help improve performance?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#What-is-a-heap-dump"&gt;What is a heap dump?&lt;/a&gt;le&lt;/li&gt;
&lt;li&gt;&lt;a href="#Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;strong&gt;&lt;em&gt;Note&amp;nbsp;&lt;/em&gt;:&lt;/strong&gt; &lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;em&gt;Th&lt;/em&gt;ere are other Appian components that use their own heap memory. This article&amp;nbsp;only applies to the heap memory allocated to the application server.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5fnns3"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-heap"&gt;&lt;/a&gt;What is heap?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap, also known as heap memory, is the portion of hardware memory that is allocated to the Java Virtual Machine that is running the application server. The heap memory is&amp;nbsp;consumed only by the application server and enables it to perform all the actions required to run your Appian environment and interact with all the other Appian components on your environment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When any process is run in your Appian Environment, the application server pulls all the objects referenced by the process from their storage on disk into the heap memory so the process can then be executed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hi6gurmd0"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;b&gt;&lt;a id="What-is-the-difference-between-heap-memory-and-total-memory"&gt;&lt;/a&gt;What is the difference between heap memory and total&amp;nbsp;memory of the application server?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span&gt;T&lt;/span&gt;&lt;span&gt;he default amount of heap allocated to an application server in Appian Cloud is 3 GB.&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The total physical memory used by the application server is always more than the allocated heap memory given to the application server. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;This is because the application server runs as a Java process which also includes a Java Virtual Machine (JVM). The heap memory exists inside the JVM,&amp;nbsp;and the Java process and&amp;nbsp;JVM&amp;nbsp;also require their own portion of the physical memory to run. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;To see more information on the physical memory used by the application server, please see the following Knowledge Base article:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a title="How to address high memory usage in self-managed Appian environments" href="/support/w/kb/463/kb-1248-how-to-address-high-memory-usage-in-self-managed-appian-environments" rel="noopener noreferrer" target="_blank"&gt;KB-1248 How to address high memory usage in self-managed Appian environments&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gkjd4"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-garbage-collection"&gt;&lt;/a&gt;&lt;b&gt;What is garbage collection?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;As the application server runs, it loads runtime objects into the heap memory.&amp;nbsp;Heap memory will become exhausted&amp;nbsp;unless the&amp;nbsp;objects that are no longer needed from the heap memory are removed by a process called Garbage collection. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Garbage collection is a form of automatic heap memory management which frees currently unreferenced objects stored in heap. Garbage collection is accomplished with a set of algorithms which organize, scan, and free unneeded objects from heap memory.&amp;nbsp;&lt;span&gt;Appian&amp;nbsp;uses the &lt;a title="G1 Java garbage collector" href="https://docs.oracle.com/en/java/javase/17/gctuning/garbage-first-g1-garbage-collector1.html" rel="noopener noreferrer" target="_blank"&gt;G1 Java garbage collector&lt;/a&gt; algorithm as of Appian version 20.1.&amp;nbsp;&lt;span style="font-weight:400;"&gt;See the following Knowledge Base article for more details on how the G1 Java garbage collector algorithm is used in Appian: &lt;a href="/support/w/kb/1763/kb-2109-g1-garbage-collector-faq" rel="noopener noreferrer" target="_blank"&gt;KB-2109 G1 garbage collector FAQ&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5gqvh5"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="When-is-heap-usage-a-concern"&gt;&lt;/a&gt;&lt;b&gt;When is heap usage a concern?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High heap alone is nothing to be concerned about. The more objects the application server is able to keep in memory, the faster it can perform work with those objects.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Appian designs the application server to run normally with high heap utilization as well to limit the amount of time spent on garbage collection, therefore reducing the impact of garbage collection on performance. Garbage collection can lead to issues when there is a need for multiple garbage collections in a short amount of time. This is where the garbage collection process runs intensely and continuously. Ordinarily, the garbage collection process is able to complete quickly without impacting the performance of the heap memory. However, when the garbage collection process runs intensely and continuously, the heap memory essentially freezes, causing general slowness across the environment since all processes utilise the heap memory. &amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The determining factor for how the heap memory and garbage collection process behave in an application server is the process activity running in that application server. It can be related to process activity causing&amp;nbsp; difficulties with removing objects from the heap memory or with pulling new objects into the heap memory. When processes are efficiently designed and the heap memory is behaving normally, there will be no difficulties with moving objects in and out of the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Customers&amp;nbsp;can investigate heap utilization and garbage collection performance by inspecting the &lt;a title="System Metric Log" href="https://docs.appian.com/suite/help/23.3/Logging.html#system-metrics-logs" rel="noopener noreferrer" target="_blank"&gt;system metrics log&lt;/a&gt;,&amp;nbsp;which for Appian Cloud customers can be accessed via the &lt;a title="System Logs" href="/support/w/kb/453/kb-1238-how-to-access-system-logs-on-an-appian-cloud-site"&gt;system logs&lt;/a&gt; page.&amp;nbsp;Appian Cloud customers can conveniently leverage&amp;nbsp;the inbuilt monitoring provided within&amp;nbsp;&lt;a title="MyAppian" href="https://docs.appian.com/suite/help/23.4/Cloud_Insights.html#metrics"&gt;MyAppian&lt;/a&gt;&amp;nbsp;to more easily view their heap utilization and garbage collection performance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-are-some-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;What are some common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;There are two effects of performance issues with heap memory in an Appian environment:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;Slowness across the entire environment&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:inherit;"&gt;An application server crash and restart&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;em&gt;&lt;span style="font-weight:400;"&gt;&lt;strong&gt;Note: &lt;/strong&gt;An application server crash on an environment with only one application server node will always result in a complete site outage until the affected application server finishes restarting.&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness across the entire environment is caused by the garbage collection process running intensely and continuously as described in the &lt;a href="#When-is-heap-usage-a-concern"&gt;previous section&lt;/a&gt;. This can occur when the rate of new objects being introduced into the heap memory is significantly high, or when there are long-lived objects in the heap memory that cannot be removed because they are being referenced by a long running active process.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The most common causes of slowness observed across the entire environment are:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;High process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Undersized heap memory allocation&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Inefficient application design&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Long running I/O requests such as queries and API calls&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&amp;nbsp;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;span&gt;An application server restart occurs when the application server is unable to load necessary objects into heap memory without exceeding the heap space limit.&amp;nbsp;In this situation an &lt;em&gt;&amp;#39;OutOfMemoryError&amp;#39;&lt;/em&gt;&amp;nbsp;Java Exception may be thrown in the &lt;a href="https://docs.appian.com/suite/help/23.4/Logging.html#application-server" rel="noopener noreferrer" target="_blank"&gt;application server log&lt;/a&gt;, after which&lt;/span&gt;&lt;span&gt;&amp;nbsp;the application server is then forcibly &amp;lsquo;crashed&amp;rsquo; and restarted.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;An application server restart may or may not proceed a period of environment slowness due to garbage collection.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The most common causes &lt;span style="font-weight:400;"&gt;of an application server restart are:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;The generation of documents from data or objects using plugins&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Very large process variables or inputs&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Bulky text manipulation&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large query result sets&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Large looping or array based operations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;In all of the causes listed above, the root cause of the issue is the same - a large object or amount of objects is being loaded in the heap memory to be acted on. In some cases these objects may need to be loaded into memory multiple times, creating further heap concerns. For instance, when manipulating bulky text which consumes a large portion of memory, any object that interacts with the text will also require the same amount of memory, exponentially increasing the used heap memory very rapidly if there are multiple objects involved in the same process.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv5hm8f7"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="How-to-fix-common-heap-issues"&gt;&lt;/a&gt;&lt;b&gt;How to fix common heap issues?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The behavior of the application server heap memory is directly affected by the process activity in the application server. Therefore, modifying the process activity in the application server is the primary solution for remediating performance issues with the heap memory.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;Slowness across the entire environment&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can be representative of high process volume. The main troubleshooting steps are to identify whether this process load is expected and whether the cause of this increased process&amp;nbsp;volume is resultant from an application design issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions for remediating high process volume include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-designing the application causing the increased process volume&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid running bulk processes simultaneously&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Re-design intensive processes to run gradually over a longer time frame&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the intensive process(es) during business off hours where there are fewer concurrent users&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Slowness can also be representative of a long running process that continuously holds references to an increasing number of objects in the heap memory. The &lt;a title="Process Activity" href="https://docs.appian.com/suite/help/23.4/monitoring_view.html#process-activity" rel="noopener noreferrer" target="_blank"&gt;process monitoring view&lt;/a&gt; can be used to identify and kill long running processes that are actively causing slowness across the entire environment. The identified processes should then be redesigned to not require continuous object references over a longer time period.&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;An application server &amp;#39;crash&amp;#39; and restart&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Processes that cause application server restarts will usually require a re-design to break the large size or amount of objects manipulated into smaller volumes that the application server heap memory can accommodate.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some solutions include:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Adding additional filters to queries used to pull data into the identified process&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Breaking larger documents into smaller documents when being processed&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes with large looping iterations&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Avoid designing processes that operate over large arrays of texts or objects&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Running the process(es) during business off hours where there are less concurrent users&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5h07b6"&gt;&lt;span style="font-family:inherit;font-size:85%;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;h3 id="mcetoc_1hgv24aq45"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Will-increasing-the-heap-memory-allocation-help-improve-performance"&gt;&lt;/a&gt;&lt;b&gt;Will increasing the heap memory allocation help improve performance?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Increasing the allocated heap memory to the application server has the consequence of reducing the remaining available memory for all the other Appian components to run on your environment. This can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Appian Engines&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Search Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Data Server&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Database&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;RPA&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;span style="font-weight:400;"&gt;Therefore, increasing the heap memory allocated to the application server should only be considered if there is more than enough resources available on the environment. Additionally, i&lt;/span&gt;&lt;span style="font-weight:400;"&gt;ncreasing the heap memory allocation is not a universal solution to all heap memory performance issues. Some causes of heap memory performance issues will still impact performance&amp;nbsp;regardless of the size of the heap memory.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Some scenarios where increasing the heap memory would&amp;nbsp;be&amp;nbsp;considered can include, but is not limited to:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;An overwhelming amount of resources being available in the environment&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Process Load&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Due to the complex nature of heap allocation and performance issues in Appian, recommendations on increases to the allocated heap memory are discussed on a case by case basis. Appian Support carefully evaluates this option when handling performance-related Support Cases and will recommend an increase if it will help improve the performance of your environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv24h8t6"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="What-is-a-heap-dump"&gt;&lt;/a&gt;&lt;b&gt;What is a heap dump?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;A heap dump&amp;nbsp;is a snapshot of the entire contents of heap memory, written to disk as a single file. Heap dumps are analyzed by Appian Support in order to investigate what was being processed by the application server during the time that the heap dump was taken.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The size of the heap dump on disk directly correlates to the magnitude of the heap utilization at the time that the heap dump was taken. Additionally, Appian Support creates more files to aid in analyzing the generated heap dump. As a result, when heap dumps are generated and investigated,&amp;nbsp;there will be an increase&amp;nbsp;in the disk consumption&amp;nbsp;on the environment.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;For Appian Cloud customers, Appian Support can generate heap dumps directly on the Appian Cloud server.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Self Managed customers, Appian Support may request for a heap dump from your application server. Please use the following Knowledge Base article for instructions on how to do so:&amp;nbsp;&lt;/span&gt;&lt;span style="font-family:inherit;"&gt;&lt;a href="/support/w/kb/393/kb-1176-how-to-generate-a-java-heap-dump"&gt;KB-1176 How to generate a Java heap dump&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; Heap dumps contain sensitive information&lt;/em&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3 id="mcetoc_1hgv5iq108"&gt;&lt;span style="font-family:inherit;font-size:120%;"&gt;&lt;a id="Why-does-Appian-Support-need-a-maintenance-window-to-analyze-a-heap-dump-in-Appian-Cloud"&gt;&lt;/a&gt;&lt;b&gt;Why does Appian Support need a maintenance window to analyze a heap dump in Appian Cloud?&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;Heap dumps contain sensitive information that should not be shared or stored in insecure locations. &lt;/span&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;For Appian Cloud customers, heap dumps are analyzed directly on the Appian Cloud site.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;font-weight:400;"&gt;The process to analyze heap dumps requires an amount of memory that is proportional to the size of the heap dump that is being analyzed. In cases where Appian Support identifies that the available&amp;nbsp;resources on the site are not enough to safely run the heap analysis,&amp;nbsp;a maintenance window is required to complete the analysis. During the maintenance window, some Appian components are gracefully brought down in order to free memory to run the heap analysis.&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;&lt;span style="font-family:inherit;"&gt;Affected Versions&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;This article applies to all versions of Appian.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Last Reviewed:&amp;nbsp;December 2023&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: heap, application server, Performance, FAQ&lt;/div&gt;
</description></item></channel></rss>