Bug report: Error when running multiple MT5 terminals

 

I have a high spec dedicated server with plenty of free CPU and RAM.

When I run 10 MT5 terminals it works ok. But when I start the 11th terminal it goes very wrong. And this doesn't just affect the 11th MT5 terminal, but the whole of Windows, for example, if I right click on the task bar there is no menu.

If there is a limit to how many MT5 can be run at the same time, then this shoudl be comminicated and there should be a more descriptive error message that stops the terminal from opening.

If there is anything that can be done from my end to be able to run more terminals, I would very much appreciate some advise.

I first had those problems in Windows Server 2019 Standard and thought that maybe it was related to that version. So I had my server host wipe the ccomputer clean and install 2016 instead, but the result is the same. They have investigated the server and confirms that everything is in order with the server itself.


 
I had this situation many years ago with MT4 (I had 20 instances of MT4 but if I add 21th Metatrader so everything stops working; I had dedicated server in that time).
And I understood in that time that there are limitation also about how many copies of Metatrader you can have in your computer opened.
I tried to discover about where this limitation is coming from and I came to something related to intenet connection or frequencies in BIOS (and it does not depend on how good is your computer with memory etc for example).

It was many years ago, but I am not installing many Metatrader instances on the computer anymore (because I have no idea about how good motherboard of my computer concerning interrupt frequency for example).
 

What is running in/on the terminal: how many charts, indicators, EAs, open handles...

Check the Task manager of the Terminals (F2).

 
Carl Schreiber #:

What is running in/on the terminal: how many charts, indicators, EAs, open handles...

Check the Task manager of the Terminals (F2).

Nothing was running. No charts were opened. Or possibly a few charts in some MT5:s, but no EAs, no indicators, and most MT5:s had no charts open at all. The CPU was 1-3%. RAM below 12%. But still the whole of Windows got all wonky when I opened an 11th terminal.

I would have thought that Metaquotes would be able to inform why this is happening, what the limits are, if there are any ways to affect the limits etc. And have better error handling. For example throw an error message saying that max number of terminals is exceeded and then close the terminal, instead of leaving it open and screwing up Windows and the other terminals.

 
Gosta Hulden #:

Nothing was running. No charts were opened. Or possibly a few charts in some MT5:s, but no EAs, no indicators, and most MT5:s had no charts open at all. The CPU was 1-3%. RAM below 12%. But still the whole of Windows got all wonky when I opened an 11th terminal.

I would have thought that Metaquotes would be able to inform why this is happening, what the limits are, if there are any ways to affect the limits etc. And have better error handling. For example throw an error message saying that max number of terminals is exceeded and then close the terminal, instead of leaving it open and screwing up Windows and the other terminals.

Sometimes it is not about the number of terminals but about settings you have in place on your Windows that is causing the bottleneck.

For example, if you set the maximum number of TCP ports allowed to be open at any given time to a low value, MetaTrader may still open but then its TCP/IP communications are placed in the queue while they wait for an open slot to be able to establish a connection to the trade server.

The current theoretical limit of number of running terminals, I believe is 32. Run a search on the forum as this number has been mentioned quite a few times.

 
Gosta Hulden:

I have a high spec dedicated server with plenty of free CPU and RAM.

When I run 10 MT5 terminals it works ok. But when I start the 11th terminal it goes very wrong. And this doesn't just affect the 11th MT5 terminal, but the whole of Windows, for example, if I right click on the task bar there is no menu.

If there is a limit to how many MT5 can be run at the same time, then this shoudl be comminicated and there should be a more descriptive error message that stops the terminal from opening.

If there is anything that can be done from my end to be able to run more terminals, I would very much appreciate some advise.

I first had those problems in Windows Server 2019 Standard and thought that maybe it was related to that version. So I had my server host wipe the ccomputer clean and install 2016 instead, but the result is the same. They have investigated the server and confirms that everything is in order with the server itself.



Are You Running The Terminals Manually Or Through Python Code ???

 
MLM4MLM #: Are You Running The Terminals Manually Or Through Python Code ???

It's manually, not via Python. When users want multiple terminals, it is for running many EAs in MQL executable form. Python would be too slow for such requirements.

 
Gosta Hulden:

If there is anything that can be done from my end to be able to run more terminals, I would very much appreciate some advise.

Here.
 

Hello everyone.

I have exactly the same problem: 10 mt5 = it works perfectly. But if I put an 11 it slows down my dedicated server considerably. (cpu resource used = less than 10%)


Did you find a simple solution to do?


I saw a modification of the registry to be done, but I admit that it seems complicated to me.
Can you explain to me in a simple way how to make this modification of the registry?

Thanks a lot.

 
Nicolas Gilles Capot Klein #:

Hello everyone.

I have exactly the same problem: 10 mt5 = it works perfectly. But if I put an 11 it slows down my dedicated server considerably. (cpu resource used = less than 10%)

Did you find a simple solution to do?

I saw a modification of the registry to be done, but I admit that it seems complicated to me.

Can you explain to me in a simple way how to make this modification of the registry?

Thanks a lot.

How much RAM does your VPS have?

 
Miguel Angel Vico Alba #:

How much RAM does your VPS have?

I have 32go. With 10 MT5s running I am below 10% memory usage.

It's not a hardware or capacity problem.

Reason: