Unexpected Server Reset - how to manage it

 

Hi to All,

I've been starting to use the Metatrader VPS to run my EA 24/24 for few days and all seems to work fine. However, I noticed a strange behavior of my EA that is not related to it but to the server.

My EA prints a "EA START" message at the beginning and a "EA STOP" message at the end, i.e. when it is initialized and deinitialized (for example when I upload the EA repeatedly). Nevertheless, I checked out the following scenario:


EA  loaded with inputs...

EA_START

[some time...]

EA  loaded with inputs...

EA_START


instead of


EA  loaded with inputs...

EA_START

[some time...]

EA_STOP

EA  loaded with inputs...

EA_START


The EA_STOP did not appear in the log and it means that teh server got reset without deinitialize the EAs correctly. It happened on Sunday, but regardless of the day, is it possible that a server is reset in a such brutal way?

Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
Documentation on MQL5: Constants, Enumerations and Structures / Environment State / Symbol Properties
  • www.mql5.com
To obtain the current market information there are several functions: SymbolInfoInteger(), SymbolInfoDouble() and SymbolInfoString(). The first parameter is the symbol name, the values of the second function parameter can be one of the identifiers of ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE and ENUM_SYMBOL_INFO_STRING. Some symbols...
Files:
 
Massimiliano Francone:

Hi to All,

I've been starting to use the Metatrader VPS to run my EA 24/24 for few days and all seems to work fine. However, I noticed a strange behavior of my EA that is not related to it but to the server.

My EA prints a "EA START" message at the beginning and a "EA STOP" message at the end, i.e. when it is initialized and deinitialized (for example when I upload the EA repeatedly). Nevertheless, I checked out the following scenario:


EA launching...

EA_START

[some time...]

EA launching...

EA_START


instead of


EA launching...

EA_START

[some time...]

EA_STOP

EA launching...

EA_START


The EA_STOP did not appear in the log and it means that teh server got reset without deinitialize the EAs correctly. It happened on Sunday, but regardless of the day, is it possible that a server is reset in a such brutal way?

These restarts usually happen on weekends over software upgrades, but very rarely one can occur on a weekday too.

It has happened to me once overnight, during the first hours of morning (european time). 

It lasted for a few seconds and the EAs were up and running after the restart was completed.

 
Eleni Anna Branou:

These restarts usually happen on weekends over software upgrades, but very rarely one can occur on a weekday too.

It has happened to me once overnight, during the first hours of morning (european time). 

It lasted for a few seconds and the EAs were up and running after the restart was completed.

Thank you Anna to have referred your experience. Actually I just thought it was a spot behavior occurring during the weekend.

It did not happened during this last week, indeed. 
 

I've experimented another strange behaviour on VPS side upon EAs migration. Actually I don't know whether it is an issue or the normality.

In few words, I've an EA which create many files if and only if they do not exist and it works fine locally, i.e. if I start it twice, the first time the files are create but the second one. At the contrary, if I migrate twice the EA on the VPS, the files are always created from scratch as if the migration would cause the systematic deletion of such files.

Is this a normal behavior or something is wrong?

Just to clarify the procedure, I've tried the following code within the OnInit() function of the EA, obtaining the aforementioned result.

int fm_fhEa2;
   
if (!FileIsExist("rls\\foo.txt", FILE_COMMON)) {
   fm_fhEa2 = FileOpen("rls\\foo.txt", FILE_TXT|FILE_COMMON|FILE_WRITE|FILE_READ);
      
   if (fm_fhEa2 != INVALID_HANDLE)
      Print("File '" + "rls\\foo.txt" + "' created");
}

Everytime I get the message "File 'rls\foo.txt' created"

Reason: