Insights Hub I received "memory quota_exceeded" error in Cloud Foundry. I want to know which application is consuming the most memory?

2020-09-28T12:58:46Z
Developer Tools

Summary


Details

I want to know why I am receiving this "memory quota_exceeded" error. I have several applications created in my org (tenant ID). How do I determine which application is consuming the most memory?

Solution

The first step is to determine how much memory is allocated to your org.

Once you are logged into Cloud Foundry, you will need two commands.

The first one is 

cf org <OrgName>

where OrgName is the name of your org.

When you run this command you should see the line in your standard output:

quota:                cf-quota-############

Use the value from quota ( cf-quota-############) to construct the next command:

cf quota <QuotaValue>

The standard output will display the Total Memory of your tenant.

To find out how much memory your org is using, a tenant admin is required to access all the spaces in your org. 

As a tenant admin, you can use cf org <OrgName> or use the following command to find all the names in your spaces. This command provides a cleaner standard output for scripting.

cf spaces

You need to switch between each space by issuing the following command:

cf t -s <SpaceName>

In each space, you need to issue the following command:

cf apps

A list of all your apps in each of your space will appear with the corresponding memory allocated with the respective apps. Take note of the memory values for each application. Do this for every space in your org. Then sort by the memory sizes to determine which application is consuming the most memory. If you sum up the values of each memory size, it should be less than the maximum memory size seen in your quota.

Notes

KB Article ID# PL8515877

Contents

SummaryDetails

Associated Components

Cloud Foundry Developer Tools - Other