3

I have developed a nodejs app with mongo connectivity.

I have deployed both mongo and node app in different containers.

I am deploying these containers using docker-compose up.

Now I want to profile those containers for memory profiling , http requests ?

I found about docker stats ,but it only gives container statastics.

I want to profile those apps for memory leaks and other stuff.

Any inputs?

1 Answer 1

2

I would suggest using pm2 : process manager for Node.js.

I did the following for my node App.

I deployed my node app inside a container built on official node image.then I connected this node app to mongodb container.

Now using pm2 I could track memory usage and other aspects of performance easily. It also has keymetrics dashboard where you can directly track resource allocations for your processes which are running docker containers.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Careful with that pm2. AGPL license. Thats the "GPL, but even if you dont distribute your app you still have to show everyone the source" version. Aka the "Richard Stallman is too stuborn to realise he accidently created a shareware license". GPL is fine, by 2021 everyone understands it and how to play nicely with it. But AGPL is a big ball of legal whack that can have some very ugly unintended consequence. Theres a reason its so popular with the dual license crowd. Its not a license, its a "Payup or else" booby trap.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.