April 6, 2023 · Fix Software Docker

Dockerd 100% CPU Usage

Cause

One potential cause of this issue is Docker's log files becoming corrupt, possibly due to your filesystem filling up or an unexpected power outage.


Fix

  1. Use the following script to find any corrupt log files in your Docker containers:
sudo find /var/lib/docker/containers/ -name *-json.log -exec bash -c 'jq '.' {} > /dev/null 2>&1 || echo "Corrupted Logfile: {}"' \;
  1. You can safely delete the listed log files manually, or by using the following script:
sudo find /var/lib/docker/containers/ -name *-json.log -exec bash -c 'jq '.' {} > /dev/null 2>&1 || sudo rm {}' \;

Explanation


  • LinkedIn
  • Tumblr
  • Reddit
  • Pocket