Skip to main content
A LACK_OF_CPU shutdown means your application sustained CPU usage beyond the limit allocated to its container, and Virtus Cloud terminated the process to protect platform-wide stability. CPU resources are shared across all applications running on the same server, and a single application that continuously pegs the CPU at 100% degrades the experience for every other tenant. This guide explains what causes LACK_OF_CPU errors and how to resolve them — either by optimizing your code or by upgrading to a plan with a higher CPU ceiling.

When Does It Occur?

You’ll see the following message in your application logs when the platform enforces the CPU limit:
[SQUARE-SHIELD] LACK_OF_CPU
The application is immediately stopped. If Auto Restart is enabled, it may attempt to relaunch after the cooldown period, but it will crash again if the underlying compute issue isn’t resolved.

Why Does It Occur?

Your application is using more CPU than its container is permitted to consume. This can happen because:
  • Your application runs an inefficient algorithm that doesn’t complete in a reasonable time under load.
  • A tight loop is executing without any await or sleep call, preventing the event loop from yielding.
  • You’re processing a large volume of events or messages simultaneously without any concurrency limit.
  • Your application includes functionality that mines cryptocurrency or performs other prohibited sustained-compute workloads.
Cryptocurrency mining and similar sustained compute-abuse workloads are explicitly prohibited on Virtus Cloud. Applications that mine crypto will be shut down permanently and the associated account may be suspended. See the Terms of Service for full details.

How to Fix It

Optimize Your Application’s CPU Usage

Before upgrading your plan, review your application’s code for common CPU inefficiencies:
If your application periodically checks a condition in a loop, make sure it yields control between iterations. In Node.js, use await new Promise(r => setTimeout(r, ms)). In Python, use await asyncio.sleep(seconds).
If your bot or API receives a high volume of events, process them in batches or use a queue with a concurrency limit rather than handling every event synchronously.
Use Node.js’s built-in profiler (node --prof) or Python’s cProfile module to identify which functions consume the most CPU time. Optimize or cache the results of expensive computations.
Move computationally intensive tasks — image processing, large dataset aggregation, cryptographic operations — to a separate worker thread (Node.js worker_threads) or process pool (Python multiprocessing), rather than blocking the main event loop.

Upgrade Your Plan

The CPU available to your application is determined directly by your plan tier. If your application’s workload is legitimate but simply exceeds what your current plan provides, upgrading is the correct solution.
1

Review available plans

Visit the Virtus Cloud pricing page and compare the CPU allocations across plan tiers.
2

Upgrade your plan

Select the plan that provides sufficient CPU for your workload and complete the upgrade from the dashboard.
3

Remove and resubmit your application

After upgrading, you must remove your existing application and resubmit it. The new CPU allocation is only applied when an application is deployed fresh — existing containers are not automatically updated.
If you continue to experience LACK_OF_CPU shutdowns after upgrading and optimizing your code, contact the Virtus Cloud support team for further assistance.