Terminal up for twelve days and now eating 3 GB of RAM
Posted: Sat Oct 31, 2026 8:10 am
Leaving a platform running for weeks feels efficient, since no restart means no lost state. The cost shows up slowly: ticks processed a little later every day, timeframe changes that hang, then a freeze at the worst moment.
Memory growth usually comes from a handful of places. Indicators that create chart objects on every bar and never delete them. Arrays in an EA that keep growing with each tick. Many charts, each holding a large history. And logs piling up in memory and on disk. Some leaks are in custom code, some are just accumulated state.
Check it rather than guess. Open Task Manager, note the working set of the terminal after a fresh start, and write it down again each morning for a week. Steady growth that does not come back down is the sign. Then remove charts, indicators and EAs one by one, restarting between tests, to find the guilty one.
The practical answer for most people is a scheduled restart, say each weekend or each day in the quiet window after rollover, with EAs written to save and restore their state from global variables or a file. Restarting should be a non-event, which also proves the setup survives a crash.
How often does the terminal get restarted, and what has turned out to be the real cause of growth?
Memory growth usually comes from a handful of places. Indicators that create chart objects on every bar and never delete them. Arrays in an EA that keep growing with each tick. Many charts, each holding a large history. And logs piling up in memory and on disk. Some leaks are in custom code, some are just accumulated state.
Check it rather than guess. Open Task Manager, note the working set of the terminal after a fresh start, and write it down again each morning for a week. Steady growth that does not come back down is the sign. Then remove charts, indicators and EAs one by one, restarting between tests, to find the guilty one.
The practical answer for most people is a scheduled restart, say each weekend or each day in the quiet window after rollover, with EAs written to save and restore their state from global variables or a file. Restarting should be a non-event, which also proves the setup survives a crash.
How often does the terminal get restarted, and what has turned out to be the real cause of growth?