cTrader UNRESPONSIVE - Massive RAM usage

Created at 10 Jan 2023, 22:01
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NC

ncel01

Joined 19.03.2020

cTrader UNRESPONSIVE - Massive RAM usage
10 Jan 2023, 22:01


Hello,

What can be the reason for such high memory usage? It easy to notice that RAM usage would go even higher if any was still available.
So far, algo trading has been only a theoretical concept to me when using cTrader.

I've submitted a trobleshoot report containing a link to this thread.

Thank you for looking at this.



@ncel01
Replies

david.siciliano
12 Jan 2023, 06:40

Massive RAM Usage

I can also confirm that since the release of cTrader desktop version 4.2, memory usage has become a critical issue. Just running cTrader desktop alone without executing and running any cBots will see a gradual increase in memory usage until the application becomes unresponsive. Currently I have to restart cTrader at least once a day.

If this issue could be given high priority it would be much appreciated.

Many thanks.


@david.siciliano

Spotware
12 Jan 2023, 08:34

Dear traders,

Please send us troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box.

Best regards,

cTrader Team


@Spotware

ncel01
12 Jan 2023, 09:29

RE:

Dear Spotware,

I've already submitted this information.

I did this 3 times:

Twice for the issue mentioned above and a third time for an exception that, in the meantime has popped up.

RAM usage seems to get cumulative overtime without any apparent reason, to a point that app gets unresponsive or, eventually, crashes.

Note: This does not take days to happen but only a few hours!

Thank you.

 

Spotware said:

Dear traders,

Please send us troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box.

Best regards,

cTrader Team

 


@ncel01

ncel01
12 Jan 2023, 09:46

RE: RE:

Dear Spotware,

Is the RAM used by the cBots only reflected in the algohost process?

If this is the case, these are definitely not the reason for such high RAM usage, as we can see in the screenshot above.

 

ncel01 said:

Dear Spotware,

I've already submitted this information.

I did this 3 times:

Twice for the issue mentioned above and a third time for an exception that, in the meantime has popped up.

RAM usage seems to get cumulative overtime without any apparent reason, to a point that app gets unresponsive or, eventually, crashes.

Note: This does not take days to happen but only a few hours!

Thank you.

 

Spotware said:

Dear traders,

Please send us troubleshooting information the next time this happens. Please paste a link to this discussion inside the text box.

Best regards,

cTrader Team

 

 


@ncel01

david.siciliano
12 Jan 2023, 10:36

RE: Massive RAM Usage

david.siciliano said:

I can also confirm that since the release of cTrader desktop version 4.2, memory usage has become a critical issue. Just running cTrader desktop alone without executing and running any cBots will see a gradual increase in memory usage until the application becomes unresponsive. Currently I have to restart cTrader at least once a day.

If this issue could be given high priority it would be much appreciated.

Many thanks.

To Spotware,

Just to add, prior to the cTrader 4.2 and above upgrades, I was able to run 5 cBot instances on a Beeks VPS with 2GB RAM running Windows 2012 without any trouble at all. Excessive memory usage wasn't an issue. Has cTrader version 4.2 and above with all the new changes been able to run on Windows 2012 okay when conducting your testing? Not sure if the earlier Windows OS could be the issue.or not. 

Many thanks.


@david.siciliano

notzen
12 Jan 2023, 10:53

RE: RE: Massive RAM Usage

This issue was already posted time ago in the chat , just using netbrains dotmemory you can see the issues , this off course keeps increasing , I reach 14 GB of ram occupied by ctrader at the end ..

 

david.siciliano said:

david.siciliano said:

I can also confirm that since the release of cTrader desktop version 4.2, memory usage has become a critical issue. Just running cTrader desktop alone without executing and running any cBots will see a gradual increase in memory usage until the application becomes unresponsive. Currently I have to restart cTrader at least once a day.

If this issue could be given high priority it would be much appreciated.

Many thanks.

To Spotware,

Just to add, prior to the cTrader 4.2 and above upgrades, I was able to run 5 cBot instances on a Beeks VPS with 2GB RAM running Windows 2012 without any trouble at all. Excessive memory usage wasn't an issue. Has cTrader version 4.2 and above with all the new changes been able to run on Windows 2012 okay when conducting your testing? Not sure if the earlier Windows OS could be the issue.or not. 

Many thanks.

 


@notzen

ncel01
12 Jan 2023, 15:09 ( Updated at: 21 Dec 2023, 09:23 )

RE: RE: RE: Massive RAM Usage

Hi notzen, David,

I've also noticed an intermittent "not responding" from cTrader process, even if a significant amount of RAM is still available in the system (40%).

Additionally, I often see "DISCONNECTED" mentioned in the journal, although, I don't really think the connection has ever been lost.

Maybe both are related, I don't really know.

Have you also noticed some of these issues?

 

notzen said:

This issue was already posted time ago in the chat , just using netbrains dotmemory you can see the issues , this off course keeps increasing , I reach 14 GB of ram occupied by ctrader at the end ..

 

david.siciliano said:

david.siciliano said:

I can also confirm that since the release of cTrader desktop version 4.2, memory usage has become a critical issue. Just running cTrader desktop alone without executing and running any cBots will see a gradual increase in memory usage until the application becomes unresponsive. Currently I have to restart cTrader at least once a day.

If this issue could be given high priority it would be much appreciated.

Many thanks.

To Spotware,

Just to add, prior to the cTrader 4.2 and above upgrades, I was able to run 5 cBot instances on a Beeks VPS with 2GB RAM running Windows 2012 without any trouble at all. Excessive memory usage wasn't an issue. Has cTrader version 4.2 and above with all the new changes been able to run on Windows 2012 okay when conducting your testing? Not sure if the earlier Windows OS could be the issue.or not. 

Many thanks.

 

 


@ncel01

Spotware
13 Jan 2023, 10:17

Hi to both,

Cross broker cTrader has been updated to v4.5.6. Please let us know if you still experience this issue with the latest version.

Best regards,

cTrader Team


@Spotware

notzen
13 Jan 2023, 11:32

RE:

Hi, 

Would be possible to have a list of issues/bugs fixed in this last version? 

In this way we can verify if other issues are still present. 

 

Thank you 

 

Spotware said:

Hi to both,

Cross broker cTrader has been updated to v4.5.6. Please let us know if you still experience this issue with the latest version.

Best regards,

cTrader Team

 


@notzen

Spotware
13 Jan 2023, 14:30

Hi notzen,

There is no such list available at the moment.

Best regards,

cTrader Team


@Spotware

tadas8891
13 Jan 2023, 15:55

I have the same problem.

I have the same problem after last update. Today for a first time I did fresh reinstall. And it seams like it fixed the problem. 


@tadas8891

tadas8891
13 Jan 2023, 16:44

RE: I have the same problem.

tadas8891 said:

I have the same problem after last update. Today for a first time I did fresh reinstall. And it seams like it fixed the problem. 

Nope it did not :( after about 1h it started lagging and freezing again. 


@tadas8891

ncel01
17 Jan 2023, 22:08 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Spotware said:

Hi to both,

Cross broker cTrader has been updated to v4.5.6. Please let us know if you still experience this issue with the latest version.

Best regards,

cTrader Team

 

Dear Sportware Team,

Thanks for your feedback.

About cTrader v4.5.6:

It looks like there is some improvement on RAM management (lower usage/slower increase over time), however, in my opinion, there is still a lot to do:

  • (1): I can still notice an intermitent non-response from cTrader process. Although it is hard to specify how often this happens and its duration, let's say (5sec/min).
  • (2): New (distinct) exceptions popped up:
    • Apparently, these did not cause a major issue (cTrader continued to running), however these are exceptions anyway, meaning that something went wrong.

  • (3): RAM usage is still increasing over time. It looks like RAM is still not being released on an effective/efficient way.
    • Evidence #1: When stoping all the running cBots the RAM usage remains the same.
    • Evidence #2: By opening a new cTrader instance without any activity, it is possible to verify that RAM usage also increases over time. Moreover, the RAM usage is already ~600Mb after the app is launched. As you can imagine, this gets even more critical when running multiple instances of cTrader.

Suggestion:

Why not providing an option to disable some of the features (which are currently enabled by default) to decrease the RAM usage? For instance, it is quite possible that someone only wants to run cBots on a certain instance. In this case, why to have all the features available and taking resources (which will be multiplied by the number of running instances)? If a trader only wants to run cBots on a certain instance of cTrader, the tabs Trade, Copy and Analyse are not exactly a requirement (from the user point of view) and could be suspended/disabled.
In my case, I don't even need any charts to be available on the Automaded section.

Although this can help reducing the RAM usage, it won't solve its growth over time, I am afraid.

So, additionaly to the above, I believe that some improvements are required so that RAM is effectively released, otherwise, it will continue to increase over time to a point where cTrader will inevitably crash.

Please consider RAM management and performance as the highest priorities for the upcoming cTrader updates. After all, this is all about reliability and, as you may know, reliability is one of the main aspects for any app and, when it comes to a trading app, this becomes the core attribute as things can really go wrong!

 

Looking forward to hearing from you.

Thank you once again!


@ncel01

ncel01
19 Jan 2023, 10:50 ( Updated at: 21 Dec 2023, 09:23 )

RE:

Spotware said:

Hi to both,

Cross broker cTrader has been updated to v4.5.6. Please let us know if you still experience this issue with the latest version.

Best regards,

cTrader Team

Dear Spotware team,

 

Apparently the issue with high RAM usage does not lie on the cBots but on cTrader itself, since the memory taken by algohost process remains very low, as shown..

Could you please assist with this issue?

Please understand that this is a very limitative issue which invalidates any attempt to perform algorithmic trading.

Thanks for assisting.

cTrader v4.5.7:

 


@ncel01

tadas8891
19 Jan 2023, 11:05

Try running cTrader as "Run as administration" it fixed my problems. Its still freezes sometimes, but like once every 5-6h instead of every 5-15min. 


@tadas8891

Spotware
19 Jan 2023, 11:26 ( Updated at: 19 Jan 2023, 11:36 )

Hi ncel01,

Memory leaks in the main process can be caused by an algo too. If you can share the source code with us, we would be happy to have a look and determine the root of the problem.

Best regards,

cTrader Team


@Spotware

ncel01
19 Jan 2023, 13:36

RE:

Spotware said:

Hi ncel01,

Memory leaks in the main process can be caused by an algo too. If you can share the source code with us, we would be happy to have a look and determine the root of the problem.

Best regards,

cTrader Team

Hi Spotware,

Are you able to check if the issue is really caused by any cBots through a troubleshooting?

How do you explain that memory is not even released OnStop()?

Thank you.


@ncel01

Spotware
20 Jan 2023, 08:53

Hi ncel01,

No we can't. We can only investigate this if we have the cBot code.

Best regards,

cTrader Team


@Spotware

ncel01
20 Jan 2023, 13:44

RE:

Spotware said:

Hi ncel01,

No we can't. We can only investigate this if we have the cBot code.

Best regards,

cTrader Team

Hi Spotware,

Let me see what I can do. The code is really huge and I don't really believe that someone will be happy to look at 5k lines of code.

Anyway, I am still wondering if cAlgo methods, OnTick(), OnBar(), etc., are managing memory properly since RAM is not even released OnStop() and, I guess, this should be something for any user not to worry about.

Please provide an option to disable the journal. It would be interesting to see if there is some improvement on memory usage by doing so.

Suggestion: please name the journal folder with the correct broker name (not always Spotware).

Thank you.


@ncel01

ncel01
23 Jan 2023, 16:13

RE:

tadas8891 said:

Try running cTrader as "Run as administration" it fixed my problems. Its still freezes sometimes, but like once every 5-6h instead of every 5-15min. 

Hi tadas8891,

Thanks for your post. However, as far as I can see, there were no improvements at all.


@ncel01

ncel01
23 Jan 2023, 16:17

RE:

Spotware said:

Hi ncel01,

No we can't. We can only investigate this if we have the cBot code.

Best regards,

cTrader Team

Dear Spotware,

Any comments on the fact that memory is not released OnStop()? Is this something I should consider in the code?

FYI: I don't have any memory issues when backtesting. RAM usage remains stable (constant).

How can this be an issue with the cBot code then?

Thanks for clarifying.


@ncel01

Spotware
24 Jan 2023, 14:37

Hi ncel01,

We can't investigate what happens if we do not receive the information we asked for.

Best regards,

cTrader Team


@Spotware

ncel01
30 Jan 2023, 01:23

RE:

Spotware said:

Hi ncel01,

We can't investigate what happens if we do not receive the information we asked for.

Best regards,

cTrader Team

 

Dear Spotware team,

I see that you hardly consider the scenario in which this can be an issue with the platform itself.

Please refer to the thread below, mentioning the same issue, now on a cTrader clean run (where cbots are no longer part of the equation).

Thank you.

 


@ncel01

crou
04 Feb 2023, 20:38

It has been still the same issue I wrote here:

cTrader 4.2 - Indicator instance process stopped responding and was terminated


@crou

hungtrash17
26 Feb 2024, 06:52 ( Updated at: 26 Feb 2024, 08:02 )

cTradet has alot of rubbish thing that I can't disable for RAM free


@hungtrash17