KB-2011 How to address high memory usage in Appian Cloud environments

Purpose

The purpose of this article is to outline how an Appian Cloud customer can reduce the memory footprint of a site.

Table of Contents

Instructions

Engines

Process Execution and Process Analytics Engines

The process execution and process analytics engines store data on processes running in Appian (such as process variables and process history).

How to Optimize

Run an Appian Health Check to identify which processes are taking up the most memory. After identifying the largest consumers you can take several actions depending on the results:

  1. Clean up processes and adjust archival settings. Often there are many complete processes in an Appian environment that are still taking up memory since they have not been set to archive or delete. If this is the case, Appian Support recommends deleting these processes and requesting a restart through a support case. This is because the memory from the cleaned up processes will be freed up when the engines are restarted. The archival and deletion settings of these processes should be set to more aggressive settings to prevent this issue in the future. Review the documentation for more details.
  2. Set a timer for processes that are never completed. Sometimes, an application will have processes that users often do not complete. These processes remain in memory forever until they are cleaned up. If this is the case, Appian Support recommends setting a timer on these processes to end the process if not completed by a certain time. Review the documentation for more details.
  3. Optimize process models. There are many tips and tricks for optimizing a process model. One of the common inefficiencies in processes are large process variables. These take up more and more memory over time as the process variables’ versions are saved. Review the documentation for more details.
  4. The built in monitoring view can help give insights into which processes are consuming the most memory. Review the Archiving Processes documentation for more details.
  5. If you want to archive or delete a process after a custom amount of time (e.g. 2 hours, conditionally based on another process), you can leverage the Process Management Services plugin from the AppMarket.

Content Engine

The content engine stores metadata and security for communities, knowledge centers, folders and documents as well as rules/interfaces, constants and data stores.

How to Optimize

High content engine memory may indicate a high number of versions of constants or document metadata. To optimize, Appian Support recommends cleaning up constant versions. Review KB-1226 for more details.

Process Design Engine

The design engine stores all of the process models and data types.

How to Optimize

High design engine memory may indicate a high number of process model versions in the cloud environment. To optimize, Appian Support recommends looking into cleaning up process model versions either manually or by leveraging the Process Model Utilities plugin from the AppMarket.

Notifications Engine

The notifications engine stores information about system notifications and alerts. These notifications are cleared from the system when both of the following requirements are satisfied:

  1. The alert is past its expiration limit (generally 10 days)
  2. The user associated with the notification logs into Appian.

How to Optimize

High notification engine memory is likely due to a large amount of system notifications or alerts. There are multiple ways to reduce the memory footprint of the notifications engine:

  1. Have all users log into Appian to clear out expired notifications, especially users that have not logged into Appian for a long period of time.
  2. For notifications that have not yet expired, have all users navigate to <SITE_URL>/suite/apps and go to "Alerts" to clear out any unnecessary alerts. If you are unable to access this page, Appian Support can enable this view through a property change and application server restart.
  3. If approved by the customer, Appian Support can delete notifications for a certain user (or all users) from the backend. Appian Support can retrieve and provide the number of alerts per user to the customer if requested.

Database Memory

How to Optimize

  1. Database memory consumption is directly proportional to the size of the tables in the database. To reduce overall memory consumption of the database, cleanup any unnecessary data. The below query can be run through phpMyAdmin to return all tables order by their size: 
    select table_schema, table_name, table_rows, avg_row_length, data_length, index_length from information_schema.tables order by data_length desc;
  2. Database memory is allocated in order to do read and write operations with the database. High database memory can be caused by complex or inefficient commands (such as large select statements or expensive views). In order to optimize database memory, Appian Support recommends revisiting the way the database is being utilized and looking for ways in which it could be used more efficiently.

When to Upgrade Hardware

As your applications grow and as Appian adds new features, your site may require more RAM to meet the increased memory demands. If optimizing memory in the components listed above has not reduced memory below our monitoring thresholds and Appian Support continues to create cases to alert you of high memory, you must upgrade hardware to reduce the risk of your site crashing and potential data loss. Please speak with your account executive to increase the memory allocation for your site.

Affected Versions

This article applies to all versions of Appian Cloud.

Last Reviewed: October 2020

Related
Recommended