Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memory Leaks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Memory Leaks

    For the past 6 months NT has been leaking memory until it consumes all memory and must be shut down. I don't really know what is causing this other than a bug in the NT application. It is quite frustrating and I found out from brokers that this is a widely known problem with NT. I have a multi-broker license so I'd rather keep my investment, but I don't know what to do at this point.

    #2
    Can you be more specific?

    Have you narrowed it down to a specific indicator or strategy? Which providers are you using?

    When do you reboot, other than a crash?

    Are you running hundreds of charts with strategies making thousands of trades?

    There is that memory leak test in market replay where it slows to a halt and eventually runs out of memory from making thousands of trades.


    Do you see odd memory requirements in windows task manager for NT? up a huge amount, then down, then up? or does it just keep going up?

    Does it take a couple hours to run out?

    You will probably be sending your log files to support.



    Originally posted by tradetree View Post
    For the past 6 months NT has been leaking memory until it consumes all memory and must be shut down. I don't really know what is causing this other than a bug in the NT application. It is quite frustrating and I found out from brokers that this is a widely known problem with NT. I have a multi-broker license so I'd rather keep my investment, but I don't know what to do at this point.

    Comment


      #3
      Hello tradetree,

      Thank you for your post.

      To investigate this matter further I will need to review your log and trace files as well as request additional information.

      Please advise how many Workspaces you have open and the size of your database file which can be found by going to Documents-->NinjaTrader 7-->db folder and the database will be named 'NinjaTrader' and will be a .SDF file type.

      In addition, please send me your log and trace files for today so that I may look into what occurred.

      You can do this by going to the Control Center-> Help-> Mail to Support.

      Please place 'ATTN: Patrick - 906059' in the subject line and reference this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=60513

      I look forward to assisting you further.

      Comment


        #4
        I apologize for missing this response. I just didn't see this post and I didn't have time to package up all the files tech support wanted. It is not to the point where NT is unusable, it is just a hassle. There are bigger problems I've had (see my post on the End Date not updating).

        I use Rithmic, and in the past I have not had a problem. I reboot at least once per week. I run about 10 charts, 1 or 2 trades per day. The leak seems to grow over a day to well over 300MB. I'll have to check it the next time it happens as it is foggy now.

        Originally posted by sledge View Post
        Can you be more specific?

        Have you narrowed it down to a specific indicator or strategy? Which providers are you using?

        When do you reboot, other than a crash?

        Are you running hundreds of charts with strategies making thousands of trades?

        There is that memory leak test in market replay where it slows to a halt and eventually runs out of memory from making thousands of trades.


        Do you see odd memory requirements in windows task manager for NT? up a huge amount, then down, then up? or does it just keep going up?

        Does it take a couple hours to run out?

        You will probably be sending your log files to support.

        Comment


          #5
          It is easy to force NT to crash due to memory leaks

          Originally posted by tradetree View Post
          I apologize for missing this response. I just didn't see this post and I didn't have time to package up all the files tech support wanted. It is not to the point where NT is unusable, it is just a hassle. There are bigger problems I've had (see my post on the End Date not updating).

          I use Rithmic, and in the past I have not had a problem. I reboot at least once per week. I run about 10 charts, 1 or 2 trades per day. The leak seems to grow over a day to well over 300MB. I'll have to check it the next time it happens as it is foggy now.
          Gentlemen (and ladies), I run the latest NT on XP under Parallels under MAC OSX. This amplifies the problems with memory and brings me crashes faster. If I want to crash NT immediately I just run a StrategyOptimizer on a strategy that sends information to the output window. That will for some reason make the whole machine unusable. The optimizer (when running strategies that are not sending to the output window) will still cause NT to get so tightly hung after running for a while that the XP OS will need a reboot to clear the problem. By the way this is not a "normal reboot" as in go to the start button and reboot. Sometimes it is a Parallels reboot (as START does not respond) and sometimes I need to kill Parallels because even it won't respond.

          Over time, we learn not to do the things that break NT, AND we learn to NEVER run optimization strategies at the same time we have active strategies trading. If you want unmanaged trades without active ATM stops in place give that a try.

          By the way, I often get the "NT is forced to shut down as your PC has run out of memory" then I try to end the program and it seems to be hung in a loop trying to tell me over and over "NT is forced to shut down as your PC has run out of memory". So it can be difficult to even get NT to shut down after it has said it is doing it.

          Comment


            #6
            GaryGuy,
            I know exactly what you mean when you say, "we learn not to do the things that break NT". I stopped even being conscious of it. When I talk about my memory leaks its when I'm not doing anything but running my live strategies so I can trade. I only ever touch anything else (like optimize) when the market is closed. There are a whole host of other major problems when you debug a strategy. The system routinely hangs with the "NT not responding" message. It really doesn't like back-testing, optimizing and debugging. I gave up running in a VM because the performance was so bad.

            Comment


              #7
              I run NT 64-bit 7.0.1000.15 on Windows 7 and I have the same problems. I keep TWS and NT running (with IBController) during the (work)week, and restart every monday.
              I have about 20 charts open and am running about 15 strategies. I don't have error messages about memory but I experience that NT gets slower and slower during the week. And the used memory is increasing every day. (This morning almost all my strats where shut off by NT for an unknown reason.)
              It would be nice if NT could put some effort in these problems. Because I bought PC's and a lifetime NT-license and made strategies etc. to automate certain parts of my life... And restarting NT (and TWS) every morning doesn't fit in there .

              Comment


                #8
                How many trades a week are you performing?

                what does task manager say about memory consumption?

                Especially compared to beginning of week.


                Originally posted by trail View Post
                I run NT 64-bit 7.0.1000.15 on Windows 7 and I have the same problems. I keep TWS and NT running (with IBController) during the (work)week, and restart every monday.
                I have about 20 charts open and am running about 15 strategies. I don't have error messages about memory but I experience that NT gets slower and slower during the week. And the used memory is increasing every day. (This morning almost all my strats where shut off by NT for an unknown reason.)
                It would be nice if NT could put some effort in these problems. Because I bought PC's and a lifetime NT-license and made strategies etc. to automate certain parts of my life... And restarting NT (and TWS) every morning doesn't fit in there .

                Comment


                  #9
                  Well, on monday my memory use was about 500 Mb, and today it is about 1000 Mb.
                  Don't know how many trades but in sim there were at least 10/day.
                  Now I have to say that in the meantime I started about 5 extra strats and I did some work with backtesting and Strategy Analyzer.

                  But my general point is: I read somewhere on the forum (I think it was posted by NT) that it is best to restart NT every day. (Also, I am using TWS (from IB) and they also want a client to restart every day.)
                  I don't understand this because as a user I want as less as possible work from these kind of things. So I want it to run continuously without problems. And what to say about trading forex (evening/night). When you're in a trade you are forced to restart and thats not what I want.
                  It would already be a little bit easier if NT could start my selected strategies automatically after start up.
                  I know that there can be a lot of technical reasons for restarting etc.. But as a client and user I want simplicity and automation as much as possible. So that should have priority in my opinion.

                  Comment


                    #10
                    To avoid memory leaks
                    1. I declare indicators in the global variables section and I add OnTerminatation method and call Dispose() on DataSeries and Indicator objects and then set them to null and clear out any other data structure objects I use globally.
                    2. I round any real values to some reasonable number of decimals before storing them in DataSeries or other arrays. I don't have any proof but my gut feeling is that storing irrational numbers consumes a lot more memory.

                    Tim.

                    Comment


                      #11
                      I have the "out of memory" problem when using the Strategy Analyzer. If I edit and configure then finish about 20 strategies, I run out of memory and have to restart NT. I find if I wait a minute or two between strategies, it buys more time. I use a Toshiba with Windows 7, 64 bit, 3.0 GHz processor with 8 gigs of memory.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Rapine Heihei, 04-23-2024, 07:51 PM
                      2 responses
                      30 views
                      0 likes
                      Last Post Max238
                      by Max238
                       
                      Started by Shansen, 08-30-2019, 10:18 PM
                      24 responses
                      943 views
                      0 likes
                      Last Post spwizard  
                      Started by Max238, Today, 01:28 AM
                      0 responses
                      9 views
                      0 likes
                      Last Post Max238
                      by Max238
                       
                      Started by rocketman7, Today, 01:00 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post rocketman7  
                      Started by wzgy0920, 04-20-2024, 06:09 PM
                      2 responses
                      28 views
                      0 likes
                      Last Post wzgy0920  
                      Working...
                      X