• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


memory leak and cache data

  • Filter
  • Time
  • Show
Clear All
new posts

    memory leak and cache data

    Has anyone had a problem with the error Cant read or write cache data? I also get a memory leak with NT8 the amount of memory NT8 consumes gradually goes up till NT8 freezes at around 2000mbs?

    I dont get the error message everytime time but mostly when trade is busy and on start up.

    The memory leak after a few hours.

    I have tried deleting directories in the DB folder and turning off antivirus ?

    Re: memory leak and cache data


    Thanks for writing in to our Support team.

    To resolve your error with cache data, please delete your cache.

    To delete the cache, follow the steps below.
    • Shut down NinjaTrader.
    • Open the Documents > NinjaTrader 7 > db folder.
    • Delete the sub-folder named 'cache'.
    • Restart NinjaTrader and test.

    Regarding your memory leak:

    So we can further diagnose your system, please start NinjaTrader in Safe Mode.

    Safe Mode will prevent NinjaTrader from:
    • Loading workspaces.
    • Connecting on start-up.
    • Loading custom assemblies.
    • Getting instrument updates from the server.

    To enable safe mode, please use the following steps:
    • Exit NinjaTrader.
    • Hold the CONTROL key and double click the NinjaTrader icon.
    • Keep the CONTROL key held down until you see the Control Center.
    • You can verify you are in safe mode by going to Help -> About.

    Please let us know if you are still receiving the error or experiencing the memory leak after starting NinjaTrader in Safe Mode.

    I look forward to your reply.
    Alan S.NinjaTrader Customer Service


      Thank you for your reply

      I have tried both methods and can say while in safe mode there is no problem.

      when I start up again the problem disappears but returns after a while when I start up mostly and sometimes when selecting different charts.

      the memory leak has no error just NT8 slows down to a crawl and eventually freezes. restart will reset the problem.

      I am getting an error now
      Indicator "" error on calling 'on bar update' method on bar 4456 and 257?



        Thanks for your reply.

        So I can diagnose your issue further, please send us your log and trace from the NinjaTrader Platform.
        To do this, navigate to your Control Center --> select Help --> Email Support.
        Ensure that you have Log and Trace files checked and put Attn Alan S in the subject field.

        I look forward to assisting you.
        Alan S.NinjaTrader Customer Service


          I have sent them off



            NT8 memory leak resolution?

            Did you ever get this memory leak resolved? I have the same issue from time to time.

            My setup has been flawless for weeks, but today, NT8 decided to do the "memory-leaking-thingy." Unable to trade with NT8 lagging so much.

            Curious what the outcome was with Tech Support.



              It looks like in this users case that the issue was with custom add-ons and/or a corrupt workspace (ticket #1630818 for my reference).

              This particular issue was also reported about a year and half ago on version

              I suspect whatever you're experiencing will need to be analyzed at an individual level. We will be able to assist you more accurately via email.

              Please write into PlatformSupport[AT]NinjaTrader[DOT]com with a brief description of what you're experiencing.
              Patrick G.NinjaTrader Customer Service


                I figure I'll post a reply here, as well as copy this in a newer topic, for those who are subscribed to this post.

                There sure is a memory dump issue with NT8, when running large strategies or optimization. I went from 32 GB to 64 GB ram, and it doesn't matter - it will fill to 100% and slow computer to a crawl - or crash if you try to be "fast" - HOWEVER, it takes longer to get to that point (so that indicated to me that there's a "build up"). At 16 GB NT8 used to crash pretty fast.

                What I did was to sync my NT8 folder, and AFTER I closed NT8, I noticed hundreds of files created in my synced google drive folder. Upon closure, NT8 deletes all those files; and so it seems like it just keeps creating and opening more and more files forever in the background, without closing them.

                My theory is that WHILE NT8 is running all those files (let's say a strategy for 500+ stocks) continually update minute data, but rather than adding data to the old file, it also keeps the previous file open, and uses a new file to collect information. It's a single stock, it should have ONE file that updates, and instead, it creates a new file for every data point it seems - and they must be all being accessed. These files are created in this folder:

                DRIVE:\Documents\NinjaTrader 8\db\cache\US Equities RTH.Eastern Standard Time\MINUTE

                Open any ticker, and you will see the insanity that ensues, as the program runs longer, until seemingly every file is open as more are being created and left open.

                Adding some screenshots to make it easier to see, especially the side by side of the synced folder, versus NT8 folder once it is closed.

                Attached Files


                  Hello lmatiukas,

                  May I confirm that the script is not making new objects in any methods and is taking advantage of IsInstantiatedOnEachOptimizationIteration being set to false?
                  Chelsea B.NinjaTrader Customer Service


                  Latest Posts


                  Topics Statistics Last Post
                  Started by yrch1985, 11-03-2019, 11:49 AM
                  8 responses
                  Last Post aligator  
                  Started by Dr3am, Today, 05:10 PM
                  0 responses
                  Last Post Dr3am
                  by Dr3am
                  Started by imalil, Today, 04:28 PM
                  0 responses
                  Last Post imalil
                  by imalil
                  Started by bboyle1234, Today, 03:47 PM
                  0 responses
                  1 view
                  Last Post bboyle1234  
                  Started by caveat_lector, Today, 03:46 PM
                  0 responses
                  Last Post caveat_lector