Beanstalk app CPU spikes

We are running a docker container on AWS elastic beanstalk, which was running fine for a few weeks but suddenly started to experience very sudden CPU spikes (from ~5% to ~60% in a matter of minutes), who sometimes drop back down quickly, and sometimes stay high for enough time to produce an autoscaling event and spin up a few instances for extra help (Which are terminated some time after that when the CPU spike dies down).

The funny thing is, I wanted to investigate the problem today, so I’ve sshed into every instance (4 in total) and ran top on all of them, trying to locate the CPU consuming process, and was surprised to discover all instances have ~15% CPU busy (system + user combined), while the EBS monitoring page still shows the servers are at 60% CPU.
I’ve measured these figures for the good part of the hour, making sure the CPU high load stays high, while the top command still shows low values.

  • Jump from command while its execution time is not ended
  • crontab not working on Centos Docker container
  • Installing an application into a docker containers through SSH
  • mongodump in mongodb container
  • Default arguments in Docker
  • On Linux, Docker can isolate applications without a virtual machine. Will applications run faster in Docker on Linux or in a virtual machine?
  • I’ve also tried to measure CPU for a while using the advice found here -, and got the same very low CPU stats when querying the server directly.

    My question is – is it possible AWS monitoring system is not showing me accurate data? Is there anyway to verify the data displayed in the monitoring page?

    Any help would be appreciated.

  • docker run command output
  • Whenever gem 'failed to load command: rake'
  • When does a running Docker container run out of disk space?
  • Install mysql in dockerfile?
  • Can you explain Docker with a practical example/case? [closed]
  • Multiple NIC and Docker containers
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.