30% off first MonthAll Promos
MT4/MT5

How to Fix the 12-Terminal Limit for MetaTrader (MT5/MT4) on Windows VPS

If you’re running multiple MetaTrader (MT5/MT4) terminals on your Windows VPS and cannot open more than 12 instances, even though CPU and RAM usage are low, you may be hitting a Windows limitation known as Desktop Heap Allocation.

Each MT5/MT4 terminal consumes graphical resources (GUI handles) used by Windows to display charts and terminal windows. Once the allocated desktop heap is exhausted, additional MT5/MT4 terminals may fail to launch or display properly.

Prerequisites

Before proceeding, ensure that each MT5/MT4 terminal is installed in its own unique directory. For example:

  • C:\Program Files\MetaTrader 5/4 - Terminal 1
  • C:\Program Files\MetaTrader 5/4 - Terminal 2
  • C:\Program Files\MetaTrader 5/4 - Terminal 3

Step 1: Open the Registry Editor

  1. Press Windows Key + R.
  2. Type regedit.
  3. Click OK or press Enter.

Step 2: Navigate to the Desktop Heap Configuration

In the Registry Editor, browse to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems

Step 3: Modify the Windows Value

  1. In the right-hand pane, locate the Windows entry.
  2. Double-click Windows to edit it.
  3. Find the parameter that begins with:
SharedSection=

By default, it typically appears as:

SharedSection=1024,20480,768

  1. Change the second value from 20480 to 40960.

Example:

SharedSection=1024,40960,768

This increases the desktop heap allocation available for graphical applications such as MT5/MT4.

Step 4: Save the Changes

  1. Click OK to save the updated value.
  2. Close the Registry Editor.

Step 5: Restart the VPS

A server reboot is required for the changes to take effect.

Important: Restarting the VPS will close all running MT5/MT4 terminals, Expert Advisors (EAs), scripts, and active trading sessions. We recommend performing this change during non-trading hours or when it is safe to temporarily stop your trading activities.

Verify the Fix

After the VPS has restarted:

  1. Open your existing MT5/MT4 terminals.
  2. Launch the 13th MT5/MT4 terminal.
  3. Additional terminals should now open successfully without graphical errors or silent failures.

Need Help?

If you continue experiencing issues after applying this change, please contact the ChartVPS Support team and provide the following:

  • Number of MT5/MT4 terminals running
  • VPS plan name
  • Screenshot of any error messages
  • Current CPU and RAM usage

Our team will be happy to assist you further.

Was this article helpful?

Not finding what you are looking for?

Get in touch with our highly experienced team of humans!

Checking on a live issue? See current system status.

Avg response < 2 min
CALLAvg response < 2 min
EMAILDetailed reply within 24h