Forum BigDB Could not grab locks for objects

Discussion and help relating to Player.IO's database solution, BigDB.

Could not grab locks for objects

Postby wbsaputra » February 1st, 2012, 3:44 am

Please give me more detail about this error and how to handle this.

Error saving player object PlayerIO.GameLibrary.PlayerIOError: Could not grab locks for objects: there was too much access to the given objects in the allotted time.

I have 7 player in room and other as spectator.
If BigDB limit are 5 concurent object to save operation any trick to avoid this?
wbsaputra
Paid Member
 
Posts: 116
Joined: June 29th, 2010, 4:38 pm

Re: Could not grab locks for objects

Postby Benjaminsen » February 1st, 2012, 12:27 pm

It's even worse, the 5 limit is per BigDB objects. Basically you are spamming the database with data faster than it's able to commit it do disk and thus it errors.

The simplest way to handle this is to have a bit of wrapper logic that delays a save if one is already in progress.
Have more questions? Join us at #player.io on the freenode irc network. Making something cool with Player.IO? I would love to talk! My Skype handle is q-rious
User avatar
Benjaminsen
.IO
 
Posts: 808
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Could not grab locks for objects

Postby wbsaputra » February 1st, 2012, 1:10 pm

Benjaminsen wrote:The simplest way to handle this is to have a bit of wrapper logic that delays a save if one is already in progress.


Sample code please .. :)
wbsaputra
Paid Member
 
Posts: 116
Joined: June 29th, 2010, 4:38 pm


Return to BigDB



cron