MT5 closing on vps - how do you handle this?

 

I’ve been running EAs for a while and it’s crazy how much time we spend backtesting while ignoring the infrastructure.

Last week a silent windows update on my vps killed my mt5 right before a volatility spike since the terminal was offline my trailing stops didn't trigger and i took a loss that

shouldn't have happened. it's frustrating when the strategy is fine but the uptime fails.

Curious to hear from the veterans here... how do you actually ensure your terminal stays open 24/7?

Do you just trust your vps provider or do you use some kind of watchdog/monitoring setup?

Personally i don't think windows auto-restart is reliable enough for real capital. I’ve been working on a custom monitoring logic to force-restart the process if it hangs, but i’d love to know if there’s a "standard" way to handle these technical glitches.

What’s your setup for 100% uptime?

MetaTrader VPS
MetaTrader VPS
  • www.mql5.com
Reliable trading hosting for uninterrupted robot operations and instant trade copying
 
Marcelo Alejandro Borasi:


breaking of windows update is a must to avoid such events. There are a few ways to do it, both for temporary period or permanent. just search google. Each method can have varying degrees of success or side effects to other parts of the OS, but after some researching, you can find the right method for your windows version and test it out before deploying it on your trading OS/vps.
 
I have been using headless linux VPS. Those are much cheaper and flexible. Albeit, aren't user-friendly or that easy to setup. However, once the setup is done, it's actually the most reliable one atleast for me
 
Michael Charles Schefe #:
breaking of windows update is a must to avoid such events. There are a few ways to do it, both for temporary period or permanent. just search google. Each method can have varying degrees of success or side effects to other parts of the OS, but after some researching, you can find the right method for your windows version and test it out before deploying it on your trading OS/vps.

i tried registry and group policy tweaks before but some vps providers still force reboots for "security patches" anyway.

my biggest issue isn't even the reboot, it's when the mt5 process stays open but the terminal is actually frozen (ghost state) an update can trigger that easily and you dont even notice until the next day.

 
Muhammad Minhas Qamar #:
I have been using headless linux VPS. Those are much cheaper and flexible. Albeit, aren't user-friendly or that easy to setup. However, once the setup is done, it's actually the most reliable one atleast for me
linux is more stable for sure but some custom dlls and eas i use are a nightmare to run on wine or headless setups, i’d rather stick to windows for compatibility if i can find a way to make it "zero-trust" regarding os stability
 
Marcelo Alejandro Borasi #:

i tried registry and group policy tweaks before but some vps providers still force reboots for "security patches" anyway.

my biggest issue isn't even the reboot, it's when the mt5 process stays open but the terminal is actually frozen (ghost state) an update can trigger that easily and you dont even notice until the next day.

Forum on trading, automated trading systems and testing trading strategies

mt5 freeze issue

Alain Verleyen, 2026.03.23 19:09

Please give technical details :

1. Provide the Journal log file (attach the whole file, not an excerpt).

2. Clarify "unresponsive in the background" : what that means exactly

 
Vladislav Boyko #:

attached the relevant log parts. i removed the login lines for privacy as you can see, there are gaps where the terminal closes with reason 9 (terminalclose) i suspect the vps or windows updates are forcing the shutdown, but the real issue is that the process often stays active in the background without any activity. i don't get any crash dumps or "not responding" errors from windows, the event loop just stops until i manually kill the process and restart mt5.

Files:
 
Marcelo Alejandro Borasi #:

attached the relevant log parts. i removed the login lines for privacy as you can see, there are gaps where the terminal closes with reason 9 (terminalclose) i suspect the vps or windows updates are forcing the shutdown, but the real issue is that the process often stays active in the background without any activity. i don't get any crash dumps or "not responding" errors from windows, the event loop just stops until i manually kill the process and restart mt5.

First, a "terminal close" happens, and after that you manually kill the process, am I correct?
 
Marcelo Alejandro Borasi #:
but the real issue is that the process often stays active in the background without any activity

Here's an interesting thread on this topic that mentions possible causes:

https://www.mql5.com/en/forum/304769

 
Vladislav Boyko #:

Here's an interesting thread on this topic that mentions possible causes:

https://www.mql5.com/en/forum/304769

exactly sometimes terminalclose triggers but terminal.exe doesn't actually exit. it stays in the background consuming ram with zero log activity that's when i have to manually kill it via task manager.
thanks for the link i'm checking that thread now, seems related to how mt5 handles gui threading during os shutdowns. my case is similar because the experts stop executing even if the process is running
 
I use scripting to check health and keep alive. Never had any issues.