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

running pm2 spikes cpu and memory #288

Closed
binarytracer opened this issue Oct 17, 2018 · 3 comments
Closed

running pm2 spikes cpu and memory #288

binarytracer opened this issue Oct 17, 2018 · 3 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@binarytracer
Copy link

binarytracer commented Oct 17, 2018

using with

pm2: 3.2.2
node: 8.12.0
npm : 6.4.1
@google-cloud/pubsub: 0.20.1
os: Ubuntu 16.04.3 LTS
subscription type: pull

file: subscription.js

const path = require('path');
const logger = require('debug')(`job:${path.basename(__dirname)}: `);
const PubSub = require('@google-cloud/pubsub');
const messageHandler = require('./handler');
const settings = require('../settings');

const keyFilePath = path.resolve(__dirname, './key-file.json');

// Creates a client
const pubsub = new PubSub({
  keyFilename: keyFilePath,
});

const { subscriptionName } = settings.google;

// References an existing subscription
const subscription = pubsub.subscription(subscriptionName);

logger('listening to any publication to any Businesses Notification');

subscription.on('message', messageHandler);

running this in pm2 initially

first
start-1

second
second

third
third

fourth
fourth

is there other debugging environment i should use to deepen the debugging?

thanks.

@JustinBeckwith JustinBeckwith added triage me I really want to be triaged. 🚨 This issue needs some love. labels Oct 17, 2018
@binarytracer
Copy link
Author

binarytracer commented Oct 29, 2018

@JustinBeckwith, hold your horses. :D, in version v.0.19.x the cpu is behaving smoothly.

It appears the v0.20.x. is not sending 'message' event to the publishers, but confirmed to work on 0.18 and 0.19. Or do i have to create another issue for this one?

@callmehiphop callmehiphop self-assigned this Nov 12, 2018
@JustinBeckwith JustinBeckwith added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Dec 2, 2018
@callmehiphop
Copy link
Contributor

@binarytracer would you mind re-testing this against our latest release (v0.23.0)?

@callmehiphop
Copy link
Contributor

@binarytracer I just made a release (0.24.0) that should resolve the issue you're seeing. If you continue to encounter this issue, please let us know! Thanks again for the detailed report!

@google-cloud-label-sync google-cloud-label-sync bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Jan 31, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants