sacredboard: Sorting issues / DataTables warning: table id=runs - Ajax error.

Sacredboard shows this error if I try to edit the filters:

DataTables warning: table id=runs - Ajax error. For more information about this error, please see http://datatables.net/tn/7

This seems to be a problem with missisng indexes in the mongodb (as far as I know). I originally got this error when starting sacredboard but after I created an index for start and end dates it only shows up when I change the filters.

I’m using the default settings for a mongodb installation on Ubuntu 17.04. Memory usage for sorting without an index seems to be limited to 32MB in this configuration.

If this is no bug in Sacredboard please add some documentation for the correct settings.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 5
  • Comments: 19 (4 by maintainers)

Most upvoted comments

Same here, adding the indices worked like magic! So just to make it easier for copy pasting:

  1. Open mongo shell (if added to PATH, just type: mongo into the shell)
  2. Switch to your database: use <databasename>
  3. Issue the following commands to create the indices: db.runs.createIndex({ “result”: -1 }); db.runs.createIndex({ “experiment.name”: -1 }); db.runs.createIndex({ “command”: -1 }); db.runs.createIndex({ "host.hostname: -1 }); db.runs.createIndex({ “start_time”: -1 }); db.runs.createIndex({ “heartbeat”: -1 });

For those that don’t know how to create an index (like I didn’t), you can use createIndex in the Mongo CLI. So to add a heartbeat index I did the following:

> use sacred
switched to db sacred
> db.runs.createIndex({ "heartbeat": -1 });
{
	"createdCollectionAutomatically" : false,
	"numIndexesBefore" : 1,
	"numIndexesAfter" : 2,
	"ok" : 1
}

@anibali I had the same problem. Adding the index you described immediately resolved the problem. So probably letting sacredboard do this automatically is a good idea.