Live profiling of Docker app

I am running a Meteor docker image in production, and it’s pegged at 100% CPU. I need to profile it, however if you google “meteor profiling” you basically just get Kadira, which is now shut down with no recommendations to an alternative.

Are there any recommendations? I don’t need some major suite. I just need to find out what is going on in my app.

You can use this package:

Meteor shell into the server, start the profiler, and then load the resulting profile into the Chrome CPU Profiler in the Devtools (I think it’s hidden behind a feature flag now… lame)

1 Like

meteor shell is great for development mode but doesn’t work in production ;(

so you may need to create a Meteor method that will actually trigger the v8-profiler and have that save it to somewhere you can access on your Docker container.

Also to save you some time you should note that last time I tried it (around Meteor 1.4.xx) I wasn’t able to include v8-profiler as a direct npm dependency from my Meteor app, I had to create a stub package which provided it.

You can get it to work in production!

1 Like