I am working on a nodejs application in combination with riak / riak-js and run into the following problem:
Running this request
db.mapreduce
.add('logs')
.run();
corretly returns all 155.000 items stored in the bucket logs with their IDs:
[ 'logs', '1GXtBX2LvXpcPeeR89IuipRUFmB' ],
[ 'logs', '63vL86NZ96JptsHifW8JDgRjiCv' ],
[ 'logs', 'NfseTamulBjwVOenbeWoMSNRZnr' ],
[ 'logs', 'VzNouzHc7B7bSzvNeI1xoQ5ih8J' ],
[ 'logs', 'UBM1IDcbZkMW4iRWdvo4W7zp6dc' ],
[ 'logs', 'FtNhPxaay4XI9qfh4Cf9LFO1Oai' ],
....
If I specify a map-Funktion and use only a few of the items in the bucket logs
db.mapreduce
.add([['logs', 'SUgJ2fhfgyR2WE87n7IVHyBi4C9'], ['logs', 'EMtywD1UFnsq9rNRuINLzDsHdh2'], ['logs', 'ZXPh5ws8mOdASQFEtLDk8CBRn8t']])
.map( function(v) {return ["asd"]; } )
.run();
everything is working fine and the following, expected output is returned:
[ 'asd', 'asd', 'asd' ]
If I now want riak to map all items (about 155.000 small json docs) in the bucket "logs"
db.mapreduce
.add('logs')
.map( function(v) {return ["asd"]; } )
.run();
I only receive errors:
{ [Error: [object Object]] message: '[object Object]', statusCode: 500 }
What does happen here? In the Error-Object nothing useful is written.
Update: The riak-console says the following multiple times:
[notice] JS call failed: All VMs are busy.
After incrementing map_js_vm_count in riaks app.config to 36, the message turns into:
[error] Pipe worker startup failed:fitting was gone before startup