Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OutOfMemoryException crashing

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

    OutOfMemoryException crashing

    Got the error in the log and NT8 crashed when running the latest release 8.0.7.1 together with two IB gateways:

    Error on executing DB command: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Text.StringBuilder.ToString() at NinjaTrader.Cbi.Order.DbAddOrderUpdate(OrderEventA rgs e) at NinjaTrader.Cbi.Order.DbUpdate() at NinjaTrader.Cbi.DB.DBThread()

    No any problems running the same script on the same laptop with NT7 and two IB gateways.

    #2
    Hello,

    Thank you for posting.



    I'm happy to check into this with you if you would please email at PlatformSupport [AT] NinjaTrader [DOT] com. In your message please include a link to this forum thread and a copy of today's trace files. You will find these diagnostic files in the Documents > NinjaTrader 8 > Trace folder. I will need to review a copy of the files which are named 'trace.20170705.XXXXX.txt'. There will likely be multiple files for each day.
    Drew O.NinjaTrader Customer Service

    Comment


      #3
      I also get this error. Only on the 32-bit version of Ninjatrader. Despite the process showing only a few hundred Megabytes of RAM in use, it throws OutOfMemoryExceptions; which seems strange because its definitely not out of memory.

      Its frustrating because the x64 version of Ninjatrader performs so badly compared to the 32-bit version.

      64-bit compiled code is only beneficial if you need to address more than 4GB of RAM - or alternatively if you have very very highly-compute-intensive code which can make use of additional registers on the x64 chipset. Ninjatrader does not meet either of these criteria.

      Outside of these two scenarios there is no benefit from using a 64-bit compiled binary - in fact it will perform approx 20-30% worse than the equivalent 32-bit version. The size of all memory pointers is doubled. Meaning every single memory reference takes up twice as much space as it actually needs; all Operands are double in size.

      Therefore the CPU's level-2 cache availability is halved, because everything takes up twice as much space as is necessary. Operands are double size, so your cache is filled with things like: Ox1A2CD3E8BFFFFFFFF when in fact all you need is Ox1A2CD3E8B meaning that not only Ninjatrader's ability to use CPU cache is halved, but everything else on the machine suffers because Ninjatrader hogs twice as much Level-II cache space as it actually needs.

      32-bit Ninjatrader does perform a lot better, as expected. But there's an issue with it throwing these OutOfMemoryExceptions - despite not using anything close to 4GB. If we could get this fixed, and ditch the completely pointless x64 version of Ninjatrader things would be a lot faster for everyone.

      Here's a blog post from Visual Studio's Architect Rico Mariani on why Visual Studio has no 64-bit version. The same reasons apply to Ninjatrader.

      Last edited by reach4thelasers; 07-07-2017, 03:01 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,605 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      13 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X