pm2 icon indicating copy to clipboard operation
pm2 copied to clipboard

The trace feature in 2.4.6 cunsumes 100% CPU

Open jornki opened this issue 9 years ago • 5 comments

  • We enabled transaction tracing for some of our servers (pm2 reload app --trace)
  • CPU usage ramps up significantly peaking at 100% at regular intervals
  • Ran pm2 reload app --disable-trace
  • The CPU usage goes back to normal

Is the --trace flag intended for debugging only is are we supposed to be able to leave it on in production?

Supporting information

PM2 version: 2.4.6
Node version: 7.8.0
OS: Linux (Ubuntu 16.04.2 LTS)

Additional info

When --trace is enabled we also see a bunch of errors like the following

Error: read ECONNRESET
    at exports._errnoException (util.js:1034:11)
    at TLSWrap.onread [as _originalOnread] (net.js:580:26)
    at TLSWrap.<anonymous> (/usr/local/lib/node_modules/pm2/node_modules/async-listener/glue.js:188:31)

jornki avatar May 05 '17 12:05 jornki

Hello could you come over our slack and pm me to discuss about it ? PS : its related to keymetrics so i'll close the issue.

vmarchaud avatar May 05 '17 12:05 vmarchaud

Yes please come over our slack or Zendesk on Keymetrics (button on the bottom left). In one of this channel could you please tell us:

  • Your web application framework
  • If you use HTTPS (looks like you use it)
  • Which database you are using

To disable transaction tracing:

$ pm2 reload <APP> --disable-trace

Unitech avatar May 05 '17 12:05 Unitech

Sure, I'll describe it in an e-mail. Thanks

jornki avatar May 05 '17 13:05 jornki

Any update on this? Was it an issue and most importantly, is this fixed?

ianko avatar May 18 '17 21:05 ianko

@ianko We are still investigating the issue but make sure that your PM2/pmx version is up to date : npm install -g pm2 && pm2 update and in your project : npm install pmx

vmarchaud avatar May 19 '17 07:05 vmarchaud