Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Database locked error?

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

    Database locked error?

    Hi,

    I'm using the newest .9 build. Twice today I've received an unexplained "can not update database, database locked" error dialog. (Sorry, that's not the exact text of the message... but I clicked it away to make sure nothing was wrong.)

    I actually received the error message on NinjaTrader running on two different machines, at different times.

    Any idea what might be going on? I don't see anything in the log. Is this fatal?

    EDIT: I'm actually using Dierk's custom build of .9, filtering out option messages.
    Last edited by heech; 03-25-2009, 11:48 AM.

    #2
    Found something in the trace file to go along with this.

    2009-03-25 10:38:14:250 (xIBMaster) IB.AccountUpdatesRequest.ProcessPortfolioUpdate: instrument='GMXR' secType='OPT' account='' size=-20 averageCost=139.3 marketPrice=1.79999995
    2009-03-25 10:38:15:546 in OnUnhandledThreadException
    2009-03-25 10:38:15:578 ********* exception trapped *********
    2009-03-25 10:38:15:578 Could not update; currently locked.
    2009-03-25 10:38:15:578 at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(OleDbHResult hr)
    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS dbParams, Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior, Object& executeResult)
    at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method)
    at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
    at Wilson.ORMapper.Internals.Connection.TransactionCo mmand(Guid transactionId, Type entityType, CommandInfo commandInfo, IDbTransaction transaction, String sqlStatement, Parameter[] parameters)
    at Wilson.ORMapper.Internals.Instance.InsertObject(Tr ansaction transaction)
    at Wilson.ORMapper.Internals.Instance.PersistChanges( Transaction transaction, PersistDepth persistDepth, Boolean parentDeleted)
    at Wilson.ORMapper.Transaction.PersistChanges(ICollec tion entityObjects, PersistDepth persistDepth)
    at Wilson.ORMapper.ObjectSpace.PersistChanges(ICollec tion entityObjects, PersistDepth persistDepth)
    at Wilson.ORMapper.ObjectSpace.PersistChanges(Object entityObject)
    at NinjaTrader.Cbi.Connection.CreateInstrument(String name, InstrumentType instrumentType, Exchange exchange, DateTime expiry, Double strikePrice, Right right)
    at NinjaTrader.IB.Adapter.Convert(Contract contract, Currency currency, Double tickSize, Double pointValue, Exchange[] exchanges)
    at NinjaTrader.IB.ExecutionsRequest.ProcessNow(Adapte r adapter, Execution execution)
    Last edited by heech; 03-25-2009, 09:59 PM.

    Comment


      #3
      Hello,

      Thank you for your post.

      Can you try rebooting your machine and let me know if the issue persists of two instances of NinjaTrader cannot be running on the same machine?
      Ray S.NinjaTrader Customer Service

      Comment


        #4
        I'll keep an eye on it, and try that and more if it repeats.

        Comment


          #5
          Are you sure you are working on the custom build I provided to you? This custom build filters our any options related TWS events and would NOT (!) trigger any NT action at all.

          Comment


            #6
            Originally posted by NinjaTrader_Dierk View Post
            Are you sure you are working on the custom build I provided to you? This custom build filters our any options related TWS events and would NOT (!) trigger any NT action at all.
            Dierk,

            I'm 99.99% sure... this is the same machine that wouldn't even connect to IB without your custom build. Is there any way to tell by looking at version numbers? I can confirm it's not showing any options in the "Positions" tab (unlike the older .8 and original .9 builds).

            I think it's possible I some how ended up with two running NT instances. I have no idea how... but when I closed my control center, I noticed NinjaTrader.exe was still running as a process. (Of course, it's possible the control center just wouldn't close cleanly... I don't know.)

            Comment


              #7
              heech,

              It is as you have diagnosed then. For sure you will have problems if you manage to get two instances of NT.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Just a final update, working with Dierk... the cause has been nailed down.

                - before you open a position in TWS (which is what I do), make sure the instrument is already in the instrument manager in NT,

                - if you Add the instrument *later*... then the first time your strategy encounters that instrument in a trade, it will have to do a CreateInstrument action in the database.

                - that particular action requires a lock of the (entire?) DB (and is perhaps also slow?), which is what's causing the locking error.

                Comment


                  #9
                  Oh, and Dierk says it'll be fixed in NT 7.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  158 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Today, 09:29 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post Belfortbucks  
                  Started by zstheorist, Today, 07:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post zstheorist  
                  Started by pmachiraju, 11-01-2023, 04:46 AM
                  8 responses
                  151 views
                  0 likes
                  Last Post rehmans
                  by rehmans
                   
                  Started by mattbsea, Today, 05:44 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post mattbsea  
                  Working...
                  X