Forum BigDB Thread abort on live server

Discussion and help relating to the PlayerIO database solution, BigDB.

Thread abort on live server

Postby wildbunny » August 3rd, 2011, 10:12 am

Can anyone tell me why this function would be aborted?

Code: Select all
public void CreateOverwriteObject(string table, string key, DatabaseObject dbo, Action successAction)
{
   this.PlayerIO.BigDB.DeleteKeys(table, new string[] { key }, () =>
   {
      this.PlayerIO.BigDB.CreateObject(table, key, dbo, resultDbo =>
      {
         successAction();
      }, OnDatabaseError);
   }, (error) =>
   {
      this.PlayerIO.BigDB.CreateObject(table, key, dbo, resultDbo => { }, OnDatabaseError);
   });
}


Apparently, its always on the first line DeleteKeys(), but since everything is asynchronous I'm confused as to what is going on...

Cheers, Paul.
wildbunny
 
Posts: 217
Joined: March 9th, 2011, 10:35 am

Re: Thread abort on live server

Postby Oliver » August 5th, 2011, 9:53 pm

The stacktrace only tells you where the executionpoint was when the code was aborted; however, the thread is being aborted because of the time it has spent before it got to that point (previous method calls, loops, etc).

In other words; The piece of code that spent a long time might be in a totally different section of your code from where the thread was when being aborted -- We have no way of tracking where time is spent across your entire game, which makes the whole thing hard to work with.

All that being said; we do have a weird random error that once in a while causes the queueing of async events (like what happens inside DeleteKeys & CreateObject) to take long time. We´re working on finding the root cause and eliminating it. I can´t tell you whether that´s the case here, or if it´s your code that ran for too long, because i don´t know.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to BigDB