Skip to main content
A LACK_OF_RAM shutdown means your application consumed more memory than the limit defined in your configuration file, and Virtus Cloud forcibly stopped it to protect both your application and the stability of other workloads on the same infrastructure. This is not a bug in the platform — it’s a safety mechanism that prevents runaway memory consumption from affecting neighboring containers. Once you understand why the limit was exceeded, you can either increase the allocation or optimize your application’s memory footprint.

When Does It Occur?

You’ll see the following message in your application logs immediately before the process is terminated:
[SQUARE-SHIELD] LACK_OF_RAM
Your application stops responding and, if Auto Restart is enabled, may attempt to relaunch after the cooldown period — only to crash again if the memory issue isn’t resolved first.

Why Does It Occur?

This error occurs when your application’s actual memory usage exceeds the value set in the MEMORY field of your virtuscloud.app or virtuscloud.config file. Common causes include:
  • Your application is handling more concurrent users or events than it was originally sized for.
  • A memory leak is slowly accumulating allocated objects that are never garbage collected.
  • You recently added features or dependencies that have a significantly higher memory footprint.
  • The original MEMORY value was set too conservatively for your workload.

How to Fix It

1

Open your configuration file

Navigate to the File Manager in the Virtus Cloud dashboard and open your virtuscloud.app or virtuscloud.config file.
2

Locate the MEMORY field

Find the line that sets your memory allocation. It looks like this:
virtuscloud.app
MEMORY=512
The value is in megabytes (MB).
3

Increase the MEMORY value

Raise the value to give your application more headroom. As a starting point, increase the current value by 50%. For example:
virtuscloud.app
# Before
MEMORY=512

# After (50% increase)
MEMORY=768
If your application is handling a larger workload, consider a more significant increase. Round up to the nearest 256 MB for clean allocation boundaries.
4

Save and redeploy

Save the configuration file and trigger a new deployment from the dashboard. The updated memory limit takes effect immediately after the application restarts.
5

Monitor memory usage

After redeployment, watch your application’s resource panel for a few minutes to confirm memory usage is staying comfortably below the new limit. If it climbs back toward the ceiling, consider another increase or investigate your code for memory leaks.
Simply raising the MEMORY value is a short-term fix if your application has a memory leak. Review your code for objects that grow unboundedly — such as arrays or Maps that are appended to but never cleared, event listeners that are added but never removed, or caches with no eviction policy.

Upgrading Your Plan

If you’re already using the maximum RAM your current plan allows, the only path forward is to upgrade to a higher tier. Visit the Virtus Cloud pricing page to compare available plans.
The platform supports RAM allocations up to 32 GB per application. If your workload genuinely requires more than 32 GB, contact the support team to discuss custom configurations.
After upgrading your plan, update the MEMORY value in your configuration file to reflect the new allocation, then redeploy your application.
If you continue to experience LACK_OF_RAM shutdowns after increasing your memory allocation, contact the Virtus Cloud support team for assistance diagnosing the issue.