Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:23:23+00:00 2026-06-14T21:23:23+00:00

I am working on a nodejs application in combination with riak / riak-js and

  • 0

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

Links:
Basho Labs Riak Driver riak-js

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:23:24+00:00Added an answer on June 14, 2026 at 9:23 pm

    Bryan from basho.com answered my Question:

    Hi, Cornelius. Could you describe a bit, your Riak configuration?
    Specifically, how many nodes are in your cluster, and what is the ring_creation_size from you app.config?

    If, for example, you’re using a default setup {ring_creation_size, 64} on a one-node development cluster, this behavior is quite likely.
    155,000 items is enough to get all 64 vnodes working.

    In the first case, before raising map_js_vm_count, those 64 vnodes are fighting over just 8 Javascript VMs, and so some are likely to be starved long enough to time out, which will cause the “All VMs are busy” log message.

    In the second case, after raising map_js_vm_count, it’s likely that those 36 Javascript VMs just aren’t able to process all 155,000 items before the query timeout arrives. The “fitting was gone before startup” log message is saying that pipe running the query shut down while there were still inputs arriving at vnodes.

    You’re not seeing either of these behaviors in the simple case with no map function because no interaction with Javascript VMs is required.
    In addition, for that case, objects are not even read off of disk, further alleviating resource contention.

    The two configuration solutions I expect will help the most are lowering ring_creation_size, and raising the query timeout. Lowering ring_creation_size to 16, or even 8 on a single-node cluster will cause less contention for Javascript VMs because there will be less attempted parallelism in the map function processing. Raising the query timeout (should be an argument to the ‘run’ function, or similar, but I’m not familiar with the riak-js client), will give the query more time to finish before shutting down, which may be necessary to overcome slow processing.

    Rewriting your map function in Erlang should also help, since it will be faster, and will not have the same sort of VM contention. But, I understand, that’s not as easy to using in early-stage development.

    HTH,
    Bryan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on integrating AngularJs into an example Nodejs application. My controller is as
I ran into an issue with my Nodejs application. I have two different apps
I am working on an application in Node.js and because this project is for
I'm working on a nodejs application. I managed to break some of the code
I'm working on an application (in Node.js, which is irrelevant for this case) which
I'm working a lot more with JavaScript in node.js. My application has the following
I'm working on a chat application with Node.js and Socket.io, and on disconnect, the
It's weird I have a little request (in nodejs) ( request_working.js ) that require
I'm working on developing a rather lightweight realtime application. We're using jQuery's event system
The application I've been working on takes user input from a form, and builds

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.