Skip to content
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

Feature Request: Alternative, larger cache disk space #139

Open
startakovsky opened this issue Apr 22, 2021 · 2 comments
Open

Feature Request: Alternative, larger cache disk space #139

startakovsky opened this issue Apr 22, 2021 · 2 comments

Comments

@startakovsky
Copy link

My workflow fails due to an out-of-memory issue during the Post Run step. I am wondering whether there is something simple I can do like point to another place which I can use to store and retrieve the cached layers.

Wish I could use your product but because we build 3 large images it seems that I am limited in memory. Thank you.

Output here:

System.IO.IOException: No space left on device
   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer()
   at System.IO.FileStream.Flush(Boolean flushToDisk)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
   at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
   at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
   at GitHub.Runner.Worker.Worker.RunAsync(String pipeIn, String pipeOut)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
System.IO.IOException: No space left on device
   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer()
   at System.IO.FileStream.Flush(Boolean flushToDisk)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id)
   at GitHub.Runner.Common.HostTraceListener.TraceEvent(TraceEventCache eventCache, String source, TraceEventType eventType, Int32 id, String message)
   at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
   at GitHub.Runner.Common.Tracing.Error(Exception exception)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)
Unhandled exception. System.IO.IOException: No space left on device
   at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
   at System.IO.FileStream.FlushWriteBuffer()
   at System.IO.FileStream.Flush(Boolean flushToDisk)
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
   at System.Diagnostics.TextWriterTraceListener.Flush()
   at System.Diagnostics.TraceSource.Flush()
   at GitHub.Runner.Common.TraceManager.Dispose(Boolean disposing)
   at GitHub.Runner.Common.TraceManager.Dispose()
   at GitHub.Runner.Common.HostContext.Dispose(Boolean disposing)
   at GitHub.Runner.Common.HostContext.Dispose()
   at GitHub.Runner.Worker.Program.Main(String[] args)
@rcowsill
Copy link
Contributor

rcowsill commented May 6, 2021

This error means the runner's SSD is filling up during the post run step. There's no way to avoid using the SSD, but you might be able to avoid the error by freeing up some SSD space before the cache upload.

Aside from that, this action does currently use a lot more space than it needs to. That's mainly caused by this issue in one of the dependencies: actions/toolkit#791.

@mrserverless
Copy link

You can save some disk space by deleting the following on Ubuntu (Android, Dotnet, Haskell):

rm -rf /usr/local/android /usr/share/dotnet /usr/local/share/boost /opt/ghc

this was mentioned in actions/runner-images#2606

Also as a last resort use this plugin https://github.com/easimon/maximize-build-space

Ultimately the disk space of the GitHub runners isn't something that action-docker-layer-caching can address since all the runner sizes are fixed. There is a thread on this here https://github.community/t/bigger-github-hosted-runners-disk-space/17267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants