I know that there are similar branches, but no solution was found.
Build 1170, the error Cannot set timer appears on one of the PCs. Sometimes it appears in OnInit() on the first run, sometimes after
UninitReason 5 (change of inputs), and sometimes the timer crashes during operation after the correct launch of EventSetTimer(). I started to
catch in OnTick() the moment when OnTimer () stops working and try to restart EventSetTimer () on OnTick (). Sometimes it
turns out the first time, sometimes with 10. the Problem appeared a few days ago, before that, more than a month, this error never appeared
.
GetLastError returns 4024-an Internal error (so-so explanation).
The terminal reinstalled, the PC rebooted – does not help.
You can translate to OnTick (), but the EA is multicurrency (I want to understand the error OnTimer ()).
Maybe someone will have some thoughts? Here is a piece of the log, as you can see-the timer flies quite often:
vvebus
Thank you all for the options, apparently there are really problems with memory.
So far, I have transferred to OnTick without multicurrency.
iks_
I do not know how you have a problem with the timer. But for example, I have a hectare of RAM, 4 MT4/5 terminals work. Each multi-currency expert Advisor
trades 12 symbols at the same time. They work through a timer, which is understandable due to the fact that ticks on symbols come in different ways. And
there were no problems. They work quietly for a week, and VDS reboots on weekends. Yes maybe I win by using SWAP on 1
a hectare in addition.
thexpert
On a cheap VPS the problem is uh just with everything that can be a problem ))
And this does not negate the fact that the terminal has a bug that can not be fixed for several years.
dali
On a VPS with 1 GB at the same time running
multiple terminals with multiple experts-always. It helps to start the terminals in turn, first MT5, then MT4.
Just don’t say again that memory is extremely low. This is clear enough. I’m just saying that the problem with the timer is really because of the memory.
PS. The problem is in both platforms.
vladon
confirm.
and 32 gigs causes problems.
But the timer flies off just when the terminal loads the memory and BAM… the timer went off.
kurscme
Maybe it’s the old Build 1170 ? Where this error is not fixed.
If
there is a possibility, check on the latest releases, maybe something has changed.
Or as Vladislav suggested, there is not enough RAM, it is also possible.
I have never had any problems with the timer. 16 Gb RAM
Even with EventSetMillisecondTimer(20);
thexpert
This is a terminal error. Which the developers do not want to recognize as a mistake can be fixed
for several years.
Why terminal?
Yes, it is banal because in the beginning, when the timers first appeared,this error was not.
And because I specifically looked at the number of allowed handles by default, which Slava rested on exceeding.
So here’s 10,000. So many handles can be opened by one process. This value can be increased. And you can achieve this level only if the
handles in the terminal flow. Not to mention the fact that this error was caught before, including almost after the start of the terminal.
vladon
there is such an error when the timer is clogged with tasks….
When there are too many of them and a big queue.
Memory gets clogged
My timer was turned off precisely because of a lack of memory error. I watched the CPU and memory.
In the timer, you need to reduce the calculations.