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

Cannot read property 'memory' of null #35

Closed
starsoccer opened this issue Aug 23, 2016 · 2 comments
Closed

Cannot read property 'memory' of null #35

starsoccer opened this issue Aug 23, 2016 · 2 comments

Comments

@starsoccer
Copy link

I recently installed Express-status-monitor which seems to make use of pidusage and it is causing an error. The status page seems to function fine, but my nodejs app will randomly crash with the following error,

TypeError: Cannot read property 'memory' of null
at \node_modules\express-status-monitor\index.js line 43 col 25)
at ChildProcess. (\node_modules\pidusage\lib\stats.js line 151 col 16)
at emitTwo (events.js line 100 col 13)
at ChildProcess.emit (events.js line 185 col 7)
at maybeClose (internal/child_process.js line 827 col 16)
at Process.__dirname.ChildProcess._handle.onexit (internal/child_process.js line 211 col 5)

@bonesoul
Copy link

I'm getting same error but instead for cpu.

@soyuka
Copy link
Contributor

soyuka commented Aug 27, 2016

My answer on pidusage:

This is due to the fact that they don't catch the error if any.

L151 here means:

  1. you're using windows
  2. The pid used for memory usage has not been found by wmic

@bonesoul please give a stack trace or the OS used for computing.

RafalWilinski added a commit that referenced this issue Aug 27, 2016
Catch pidusage errors, fix #35
tw0517tw added a commit to tw0517tw/koa-monitor that referenced this issue Oct 19, 2016
ref: RafalWilinski#35

On Windows machines, it sometimes occurs error.
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

No branches or pull requests

3 participants