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

Application has thrown an uncaught exception and is terminated #4

Closed
nwabdou85 opened this issue Jul 9, 2018 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@nwabdou85
Copy link

I've a serious problem with this package; it's stop some code from execution and when I remove it , all it's ok; this is the error I ve in the console

Monti APM: completed instrumenting the app
Monti APM: Successfully connected
Mon Jul 09 2018 21:00:32 GMT+0000 (Coordinated Universal Time): Application has thrown an uncaught exception and is terminated:
Error: spawn EPERM
at _errnoException (util.js:1022:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at exports.spawn (child_process.js:502:9)
at Object.win (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\montiapm_agent\node_modules\pidusage\lib\stats.js:123:18)
at Object. (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\montiapm_agent\node_modules\pidusage\index.js:14:28)
at Object.exports.stat (D:\home\site\wwwroot\programs\server\npm\node_modules\meteor\montiapm_agent\node_modules\pidusage\index.js:37:20)
at SystemModel.usageLookup (packages\meteor.js:258:21)
at SystemModel.getUsage (packages\montiapm_agent.js:1999:20)
at SystemModel.buildPayload (packages\montiapm_agent.js:1983:20)
at Object.Kadira._buildPayload (packages\montiapm_agent.js:2406:42)
at packages\montiapm_agent.js:2452:26

How can I fix that ?

Thank's

@zodern
Copy link
Member

zodern commented Jul 11, 2018

On windows, the user running the app needs to be able to run wmic. It is used to get the app's cpu usage.

This package should handle the error and show a warning that it is unable to get the app's cpu usage. Also, node 6 added process.cpuUsage which we could look into using instead when available.

@nwabdou85
Copy link
Author

@zodern So, what the solution ?? the package still prevent some code from running

Thank's

@zodern zodern added the bug Something isn't working label Jul 12, 2018
@zodern
Copy link
Member

zodern commented Jul 13, 2018

This is fixed in version 2.32.2. Instead of crashing the app, it will show a message in the logs, and the memory and cpu usage will show as 0 in the Monti APM UI.

The command that is failing is:

wmic PROCESS where ProcessId=<insert app PID> get CreationDate,KernelModeTime,ParentProcessId,ProcessId,UserModeTime,WorkingSetSize

You can try running it to see why it is failing. Remember to insert the PID of the app in the command.

Once soyuka/pidusage#63 is implemented it will be able to get the cpu and memory usage in Meteor 1.6 and newer without using wmic.

@zodern zodern closed this as completed Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants