Disk space is too low. Only "less than a GB" left on /var/lib/jenkins

4,332 views
Skip to first unread message

Víctor Puertas

unread,
Aug 1, 2018, 6:04:16 AM8/1/18
to Jenkins Users
My master node became disconnected due to this error:
- Disk space is too low. Only "less than a GB" left on /var/lib/jenkins
The current size of the directory is 5.4GB.
Why does this folder weight that much?
Is there a way to decrease the size without adding space on the machine? I'm thinking a solution as removing temporary files but I'm not familiar with the content of this directory.

Thanks.

Jan Monterrubio

unread,
Aug 1, 2018, 8:11:49 AM8/1/18
to jenkins...@googlegroups.com
You can run a “du -h —max-depth=1 | sort -hr” in the folder and find it that’s takig the most space. I think part of the maven published sites end up on master. So if you have a lot of workspaces hanging that don’t need to be around, you could delete those. 

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3105de47-a80e-460f-8e03-f85740c6b0ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Waite

unread,
Aug 1, 2018, 8:36:00 AM8/1/18
to jenkins...@googlegroups.com
Another technique that has helped me save space in the past was limiting the number of builds that I kept, especially on jobs where the build history is much less important than the most recent results.  The "configuration slicing plugin" can help make configuration changes to many jobs at one time if you were initially retaining all builds and now want to limit the number of builds retained.

Mark Waite

Amit Ghatwal

unread,
Aug 6, 2018, 6:03:43 AM8/6/18
to Jenkins Users
Few methods which we employ to save on space is by using
1. any "post-build" for any job to delete job workspace if not needed.
2. Limit the number of job build logs to minimum - say around 2-4.
3. Install this disk usage plugin - https://wiki.jenkins.io/display/JENKINS/Disk+Usage+Plugin which helps monitor.

Baptiste Mathus

unread,
Aug 6, 2018, 8:38:16 AM8/6/18
to jenkins...@googlegroups.com
Note, also, that disk space is generally cheap these days. Much much cheaper than engineering time. You didn't tell us how many jobs this instance is running, and what kind of workload. Depending on this, 5.4 might be enough, or way too small.

I usually see masters with dozens, at least, of hundreds of GB. So 5 GB seems like something I wouldn't even start spending time looking at.

--
Reply all
Reply to author
Forward
0 new messages