How to profile nodejs app for memory leaks inside docker container?

I have developed a nodejs app with mongo connectivity.

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

  • Mount OpenAFS host volume in GitLab-CI runner to make it accesible in Docker
  • Git push hang in there
  • Dockerfile CMD instruction will exit the container just after running it
  • Can't connect to docker published port for tftp
  • supervisord not stopping docker run
  • Unable to install docker 1.5 on ubuntu 14.04 64bit
  • 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?

  • Asp.Net Core with Docker - Duplicate 'Content' items were included
  • How to source /etc/profile and save it in docker?
  • Docker container logs taking all my disk space
  • container running but cannot be visited in browser
  • Fail join node to docker swarm
  • Cant Connect to HBase in a Docker instance
  • One Solution collect form web for “How to profile nodejs app for memory leaks inside docker container?”

    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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.