Db: unable to read the disk, please verify the disk is not corrupt

@stefanbenten docker hangs up each 2-3 days and throwing that error:

[013:06:38:44.027][I] time="2022-01-13T06:38:44.024220838Z" level=error msg="Failed to get event" error="rpc error: code = Unavailable desc = transport is closing" module=libcontainerd namespace=plugins.moby
[013:06:38:44.027][I] time="2022-01-13T06:38:44.024419921Z" level=error msg="Failed to get event" error="rpc error: code = Unavailable desc = transport is closing" module=libcontainerd namespace=moby
[013:06:47:08.337][I] time="2022-01-13T06:47:08.332335669Z" level=error msg="Error sending stop (signal 15) to container" container=069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e error="Cannot kill container 069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e: connection error: desc = \"transport: Error while dialing dial unix /var/run/desktop-containerd/containerd.sock: connect: connection refused\": unavailable"
[013:06:47:18.368][I] time="2022-01-13T06:47:18.368299423Z" level=error msg="Container failed to exit within 10 seconds of kill - trying direct SIGKILL" container=069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e error="context deadline exceeded"
[013:06:47:58.153][I] time="2022-01-13T06:47:58.152787261Z" level=error msg="Error sending stop (signal 15) to container" container=069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e error="Cannot kill container 069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e: connection error: desc = \"transport: Error while dialing dial unix /var/run/desktop-containerd/containerd.sock: connect: connection refused\": unavailable"
[013:06:48:08.168][I] time="2022-01-13T06:48:08.168030794Z" level=error msg="Container failed to exit within 10 seconds of kill - trying direct SIGKILL" container=069ca1e8703d4d5836ac05e174044b3b4494432413eb1ab484035287d893e30e error="context deadline exceeded"
[013:06:48:59.458][I] time="2022-01-13T06:48:59.458115251Z" level=error msg="Error getting services: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again."
[013:06:48:59.458][I] time="2022-01-13T06:48:59.458115251Z" level=error msg="Error getting servic
es: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to conne
ct this node to swarm and try again."
[013:06:48:59.458][I] time="2022-01-13T06:48:59.458143918Z" level=error msg="Handler for GET /v1.
24/services returned error: This node is not a swarm manager. Use \"docker swarm init\" or \"dock
er swarm join\" to connect this node to swarm and try again."
[013:06:48:59.465][I] time="2022-01-13T06:48:59.464935043Z" level=error msg="Error getting servic
es: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to conne
ct this node to swarm and try again."
[013:06:48:59.465][I] time="2022-01-13T06:48:59.464971043Z" level=error msg="Handler for GET /v1.
24/services returned error: This node is not a swarm manager. Use \"docker swarm init\" or \"dock
er swarm join\" to connect this node to swarm and try again."
[016:07:23:38.060][I] time="2022-01-16T07:23:38.059893918Z" level=info msg="ignoring event" container=62e8926c69e4aec95d23ef6b73221478b64ffe10bdcec161876c0e2e66633234 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
[016:07:23:38.532][I] time="2022-01-16T07:23:38.532424376Z" level=info msg="ignoring event" container=62e8926c69e4aec95d23ef6b73221478b64ffe10bdcec161876c0e2e66633234 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"

Not sure if doing docker swarm init will have side effects.
Have you had this issue?

My fallback will be listening to port ping + docker availability with crontab, forcing a macOS restart, if both are responding with “unavailability”. But this will be some kind of “hard kill” and there might be another way solving it.

Update: I’ll let docker restart once a day automatically via crontab on MacOS.
Hope it helps:

45 20 * * * osascript -e 'quit app "Docker"' && open -a Docker