# ERROR: (\*service).Write failed: rpc error: code = Unavailable

**URL:** <https://forums.docker.com/t/error-service-write-failed-rpc-error-code-unavailable/151973>\
**Category:** Docker Desktop\
**Created:** [July 1, 2026, 6:44am UTC](https://forums.docker.com/t/error-service-write-failed-rpc-error-code-unavailable/151973 "2026-07-01T06:44:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![torstenrobitzki](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/torstenrobitzki/32/39658_2.png) [@torstenrobitzki](https://forums.docker.com/u/torstenrobitzki)\
**Post date:** [July 1, 2026, 6:44am UTC](https://forums.docker.com/t/error-service-write-failed-rpc-error-code-unavailable/151973/1 "2026-07-01T06:44:58Z")

</div>

Hi,

once in a while, while creating a docker container, I get the following error message:

> ERROR: (\*service).Write failed: rpc error: code = Unavailable desc = ref layer-sha256:b4c2f45cc053d8d4f6162c0a288b3b73ece85435ec0c3fbd0fc75b4e8c1d1aaa locked for 3.916µs (since 2026-07-01 08:38:12.394391 +0200 CEST m=+36.880718543): unavailable

My workaround currently is, to just repeat the build:

> docker buildx build --platform=linux/amd64 -t windows\_build\_amd64 -f DockerfileWindows --cache-from type=local,src=/Users/todi/.docker-cache-0.0 --cache-to type=local,dest=/Users/todi/.docker-cache-0.0,mode=max /Users/todi/bootloader --output type=docker --target qt

Any idea, as how to make automations with docker more reliable? Any parameters that I could change?

What makes me especially nervous is, that the command returns without indicating an error. So if you pipe that command above with `docker builds … && echo “success”`, you will see a success.

TIA

Torsten

Docker version 29.5.3, build d1c06ef

macOS 15.7.7 (24G720)

docker.desktop 4.79.0 (230596)

Buildx v0.34.1-desktop.1

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/docker/original/3X/d/4/d4fbccd46c81bfcffe9822e20e17736d946fa821.png) [@system](https://forums.docker.com/u/system)\
**Post date:** [July 31, 2026, 6:45am UTC](https://forums.docker.com/t/error-service-write-failed-rpc-error-code-unavailable/151973/2 "2026-07-31T06:45:44Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
