Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kadira not working correctly with meteorhacks:cluster multi-core setup #248

Open
hyperborea opened this issue Sep 5, 2016 · 2 comments
Open

Comments

@hyperborea
Copy link

Ever since I've activated the cluster package using CLUSTER_WORKERS_COUNT the kadira dashboard appears to be missing data. Could it be that only the main node is sending metrics over?

@lmachens
Copy link

Same Problem here.

@lmachens
Copy link

@hyperborea I found a solution:

  1. Don't use Auto Connect
  2. Set different hostname for each cluster worker
Meteor.startup(function() {
  const { id, secret } = Meteor.settings.kadira;
  let hostname = 'your_hostname';

  // Check if cluster is active
  if (process.env['CLUSTER_WORKER_ID']) {
    // append number of cluster to the hostname
    hostname += `.${process.env['CLUSTER_WORKER_ID']}`;
  }

  Kadira.connect(id, secret, { hostname });
});

Every cluster worker counts as a session in Kadira. So with 4 cors you will see at least 5 sessions (cluster balancer + 4 workers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants