Netty implementation of CopyArchiveFromContainerCmdExec.exec() waits until all data is copied to the internal ByteBuf queue and only then returns InputStream for a client code to handle. If the copied files are too large then io.netty.util.internal.OutOfDirectMemoryError: failed to allocate ... is produced.