-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Operations hang after starting system prune #2501
Comments
I tried to do a factory reset but that also hung. Killing the Docker process caused it to restart with what appears to be a clean install. Again, no UI feedback on what the last step was – the progress bar was over on the 100% side but it stayed there without feedback for at least 10 minutes. |
I also experienced this behavior. Attempting to use Diagnose & Feedback while (Note this was my second attempt at
|
Fyi, mine looked like it was hanging for a while -- I googled around for answers, found this, waited some more, and it finally completed about 20-30 minutes after I initiated the command. |
A lot of the material I've read indicates one must be very careful using Docker prune. In order to remove unused images "The client and daemon API must both be at least 1.25 to use this command." And, there are Docker prune options that might be a better option to Docker prune, i.e., --all , -a (for removing all unused images, not just dangling ones. This is significant because by default, Docker image prune cleans up dangling images only. |
MacOS HighSierra (Docker version 18.03.1-ce, build 9ee9f40):
My proposition: lets make Currently I think it is good idea to break |
Isn't it great when you're stuck waiting at the command line, wondering if this thing has become broken again? Struggling to understand how traversing a tree and deleting some files could be taking so long... Then you check your running processes and wonder to yourself...if the lost soul who wrote this thing couldn't be bothered to output some status text to the user, did he correctly implement signals to clean up and not leave itself in an inconsistent state on restart? The world will never know. |
This is awful. I've wasted half a day waiting for it to complete. I eventually cancelled it so hopefully docker will clean up ok. |
ran into this today too, system prune and image prune both resulted in the same behavior |
If you have lots of untagged images, run the following command:
There could potentially be lots of these images, and when you run:
It doesn't show the images as they are being untagged and deleted, so it seems like the docker command is hanging. |
Just an update to @briancaffey's solution... Sounds silly, but for me things "seemed" to work better, by copying and pasting a list of I used this to generate the list: docker images -f "dangling=true" -q | xargs -I {} echo docker rmi -f {} (I got visual feedback on progress, I could see which image was holding things up, etc etc) |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
/lifecycle frozen |
Just wanted to report that I ran into this same problem yesterday and abandoned I spent the good part of a day trying to get Docker to work again; completely uninstalling Docker and reinstalling, restarting, etc. I eventually deleted all the containers and manually removed every file related to Docker and only then did a fresh install get Docker working again. |
For me, this is just really, really slow (running for hours) with no user feedback of whether it's stuck or not. If I run |
Same Issue |
Same issue. It seems to me that it's pretty absurd how long this takes. I have to kill and restart often, often with very few images on my system. Sometimes I will have to do a docker reinstall because it can't recover. I tend to run prune very infrequently because I know its going to take a long time. There is no way to tell if it is stuck or just slow. As far as I can tell, it does get stuck sometimes. |
I cannot believe that this feature is marked as |
@gokcan read this #2501 (comment) |
@kamil-kielczewski Is this issue under active development? The |
Same issue on 18.09. It already mentioned having deleted containers and networks. No idea what it is doing now, if anything. |
I have some additional information based on more recent observations. Based on a stack overflow answer, I have been using the following script in stead of the actual prune command:
This script will usually complete for me. However, there seem to be a few issues with this approach:
My guess is that the cause of these behaviors is the same as the prune command. Running any of these script or the prune command is the only time in the normal course of my development that docker becomes unresponsive. I've been running docker on my Mac for over 2 years and it seems pretty consistent behavior across all versions I use. I tend to keep docker on the current stable release and have 18.09.2 installed right now. Hopefully this information is helpful. |
Just add --force after prune command and the action will be over before you know |
Experienced the same issue like @Vitiell0. Tried I guess it's back to nuking docker from orbit like in the good ole' days ~2 years ago (removing the image file) where this was the only thing that actually guaranteed to get things working without 2h+ debugging. My Docker has access to 3 cores and 6GB RAM.
Edit2: Uninstalling and installing Docker again didn't help. I also needed to purge all Docker files for daemon to start again. Boils down to removing the following directories:
|
@mikeparker is docker for mac still supported? |
I can't believe this is still an issue... |
Still an issue. Happened to me just yesterday and requires a full computer restart to calm docker down from using all the available CPU |
This still happens for me. I usually just hit ctrl + c a few seconds after it hangs |
I have the same issue. Although I can see disk space slowly gets freed up, the lack of any indication for when the pruning process will finish is really bothersome. The command |
Please fix this issue. |
+1 |
1 similar comment
+1 |
I'm having this issue with
|
+1 to having more feedback, since on my mac and linux (Ubuntu 16.04) server a lot of instances feel like this is just hung. Thanks! |
Same here MacOs 10.15.7 - docker version 3.0.1 (50773) after docker container prune hangs. |
Ubuntu 20.04 |
Since this is an issue for the Mac Docker desktop app, that sounds like it should be a new issue — and since it has a reliable crash you should be able to get logs to further narrow down the issue. One of the challenges on this issue is that it doesn't have a simple root-cause indicator. |
MacOS 11.2.3 running the latest version of docker. Ran "docker image prune" this morning, it's been using 100-150% CPU for 6+ hours, no output or feedback. Trying to run any docker command in another window hangs. Docker Desktop App shows no containers or images. I am about to kill the prune task and see if I've lost all my stuff or not.... Sample attached. This seems like a pretty serious issue to have open for years:( Even if root cause(s) are hard to find, at least adding in some basic progress/output/info to the command seems like a simple improvement... |
I just gave it a bit of patience and after 20 minutes i reclaimed 68.6GB of disk space |
Maybe it was silently or unintentionally fixed? Maybe I'll give it another shot. The several times I tried it, I let it run for several hours before sending it a ctrl-c, and doing that hung the whole system. I doubt I had more than 100GB in excess images on that 500GB laptop hard drive. I wonder if this has something to do with the amount of available disk space? I was probably low-ish on disk space which is why I was running the task to begin with. I could see running out of disk space having an effect like this if they were doing some sort of disk caching or whatever— I don't think I checked. Either way, I personally I wouldn't make a utility that ran for 1 minute, let alone hours, without a status update. Jeez, I even do that for utilities I write for myself just so I know it's working as intended. At least a warning that there wasn't going to be a status update for the long-running task if giving real time updates isn't feasible for some reason. Also, if it's going to kill your system when you try to exit it, that should be something the user should be informed of and able to opt out of before you pass the point of no return. It's not like you're formatting a partition here— from a user perspective, it seems like it should be about as intensive as emptying the trash on your OS rather than some involved process that takes forever to complete. |
This is problematic when using CI tool such gitlab, this give timeout (or we lose SSH connection), What about a quick win solution: "add a command flag to specify how many images/volumes can be deleted" or "add a timeout" So we can run the prune command multiple time without any timeout. |
same - it does the job but not intuitive as stated above and takes long time - for
|
Still the same in 2022 🤔 |
This was shared earlier in this thread but including the
|
I'm gonna bake this issue a cake for its 6th birthday:D |
/remove-lifecycle stale |
|
still present, no progress for pruning the builder cache either this has been running for a few hours now |
As the original reporter, I feel I should note that I unsubscribed from this because I switched to Podman in 2021 and it's been so much better for performance, memory usage, and stability. Maybe your needs are more complicated than mine but at this point I'd have trouble believing that 2025 will be the year this issue is fixed. |
Wow. Yeah, this probably will never be fixed. I will say this though, it does seem to affect a very small percentage of people. I worked at a company with ~40-50 developers all with similar toolchains as me and I was the only one impacted by this issue. When my computer was replaced (due to lifespan refresh, not for any other reason), I never had the issue again. |
I ran
docker system prune
to clear out old dev images. That appears to have hung with no feedback: commands likedocker ps
hang and there's no UI indicating what might be the problem. There were periods where Hyperkit was 140% CPU but the running average is close to idle and disk I/O has fluctuated between modest (tens of operations per second) to idle.It's possible that everything is working correctly but it'd be nice to know whether that's the case and whether I should just leave it running (after about 10 minutes) or if restarting it will be required.
Information
Steps to reproduce the behavior
docker system prune
docker ps
The text was updated successfully, but these errors were encountered: