Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Lost Connection to Server

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

    Lost Connection to Server

    Hey there,

    This is the error that I got while debugging with Visual Studio 2022:
    2025-02-24 15:30:36:012|1|64|Instrument='SOXL' Account='Playback101' Average price=31.049999999999926 Quantity=100 Market position=Short Operation=Operation_Add
    2025-02-24 15:30:36:025|1|32|Order='f6cecee6fe2f4be099ce9e415 1c3de7c/Playback101' Name='Svt-SOXL-S-Enter' New state='Filled' Instrument='SOXL' Action='Sell short' Limit price=0 Stop price=0 Quantity=160 Type='Market' Time in force=GTC Oco='' Filled=160 Fill price=31.04624999999993 Error='No error' Native error=''
    2025-02-24 15:30:36:025|1|8|Execution='34e953075bf3430295e82f a5055c216c' Instrument='SOXL' Account='Playback101' Exchange=Default Price=31.039999999999925 Quantity=60 Market position=Short Operation=Operation_Add Order='f6cecee6fe2f4be099ce9e4151c3de7c' Time='11/05/2024 09:08:01'
    2025-02-24 15:30:36:048|1|64|Instrument='SOXL' Account='Playback101' Average price=31.04624999999993 Quantity=160 Market position=Short Operation=Update
    2025-02-24 15:36:08:152|3|2|Connection lost to the NinjaTrader Historical Data Server: hds-us-nt-008.ninjatrader.com
    2025-02-24 15:36:19:940|1|2|Using HDS (hds-us-nt-011.ninjatrader.com/31655)
    2025-02-24 15:36:31:598|1|2|Connection restored to the NinjaTrader Historical Data Server: hds-us-nt-011.ninjatrader.com

    This is the end of the log, NinjaTrader had crashed at that point.

    I've actually been suffering through this for years now. It happens when I'm running an extended debugging session on visual studio.
    To further clarify, I'm running playback doing forward testing with historical data. The historical data is filled out properly.

    I have tried to flush the DNS and worked through setting the Power Management to off under network adaptors, but it seems like this is due to debugging; the application tries to communicate with something, and it's blocked during debug thus causing the crash.

    Thank you for your time and patience.

    #2
    Hello,

    What version of NT are you using? What version of Visual Studio are you using?

    Is this specifically only occurring when you're using Visual Studio?

    Comment


      #3
      The latest version for NinjaTrader and Visual Studio. This actually been occurring for years on two PC's

      Comment


        #4
        Hello,

        Do you have any assemblies with the old Agile? (any version other than 6.9.1.2​)

        Are you using breakpoints?

        Lastly, are you able to reproduce this behavior on a clean environment? To test, you may follow the steps listed below to completely uninstall and reinstall NinjaTrader.
        • Close all running applications.
        • Navigate to your Documents folder > Right-click on the 'NinjaTrader 8' folder > Rename > rename the folder to 'NinjaTrader 8 OLD'. DO NOT delete this folder (it will contain your original files).
        • Uninstall NinjaTrader within Windows Control Panel.
        • Navigate to C:\ > Program File > Delete the 'NinjaTrader 8' folder if it exists
        • Reboot your PC.
        • Once these steps are completed, download and install NT8 from the link below:
        • After you have reinstalled NinjaTrader, recreate your Live Connection and test for this behavior.

        Comment


          #5
          Hello again,
          In regards to Agile, I have latest version.

          However, I don't see the relation here. The issue is occurring while in debug mode with break points. I mentioned in the original post that this occurs during debugging with breakpoints but typically happens when the debugging session is extended (looking up variable values, stepping through the code etc...)

          I have tried the clean environment approach in the past and hasn't worked.

          Just to be clear, this occurs while debugging with break points and in Playback mode. There are no crashes in live and release mode.

          I'm really wondering if other developers are experiencing crashes while debugging with visual studio.

          Comment


            #6
            Just to confirm this is the version you have, the supported version of Agile is 6.9.1.2​.

            If you have any assemblies that were created using an older version (even if you now have the latest version) - these are known to cause issues with NinjaTrader and Visual Studio. That is the relation.

            When you say "extended" - do you mean in terms of it being resource intensive, or the duration of the session?


            At this time we have no other reports of crashing, although again it is known to crash if the person has assemblies created using a previous version of Agile installed.

            Comment


              #7
              Yes it is 6.9.1.2.

              We don't have any assemblies that were created prior to 6.9.1.2., We have a couple of assemblies that we created with NinjaTrader 8.1.3 or newer and version 6.9.1.2 Agile but the script we have the issue with is not utilizing any of these scripts.

              What I mean by extended is that the debugging session stays idle for some time setting on a break point or could be a long session of investigating the values of several variables.

              Is there something I can do to try to catch the crash and have it logged?

              Thank you.

              Comment


                #8
                Hello,

                Thank you for confirming.

                I've consulted with my team, who've let me know that if you have breakpoints that stop the platform for an extended period of time, this will cause a connection loss eventually as the platform is essentially frozen.

                The crash cannot be "caught" by the platform since a crash means the platform is not able to function. However the log will show the next time NT is re-started.

                Comment


                  #9
                  Ok, I will lookup the logs after the crash and see if there is a clue in there to help out.

                  Thank you for your time and patience.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  69 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  24 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  27 views
                  0 likes
                  Last Post TheRealMorford  
                  Started by Mindset, 02-28-2026, 06:16 AM
                  0 responses
                  54 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Working...
                  X