Blocked puts when running Khepri on ephemeral fly.io storage #331
Replies: 2 comments 2 replies
-
I was able to resolve this by deleting the khepri_data folder manually ( |
Beta Was this translation helpful? Give feedback.
-
@KagemniKarimu this should have been a discussion, you haven't provided a whole lot of details and removing a data directory is not a "fix". Running Khepri or any other Raft-based system on ephemeral storage is not only a terrible idea, it directly violates the assumptions in the Raft paper. Use durable storage and make sure the cluster always has an online majority, or use a different storage option entirely. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What does not work?
Context:
We are running a Phoenix app on Fly.io, using Khepri as a single-node Raft-backed key-value store. The app runs as the nobody user and stores Khepri data in a mounted Fly.io volume.
✅ When It Works:
Data directory: /app/priv/khepri_data (inside the container’s ephemeral FS, not on a fly.io volume)
Behavior: :khepri.start/3 and subsequent :khepri.put/3 succeed
WAL files are written and visible in that ephemeral directory, but obviously don't persist
❌ When It Fails:
Data directory: /app/data/khepri_data (a Fly volume mount at /app/data)
Behavior:
:khepri.start/3
succeeds and logs normal Raft startup:khepri.put/3
call hangs indefinitelyWAL files are written (which suggests at least partial Raft write starts)
Permissions:
Expected behavior
❌ The behavior should not be:
How to reproduce
To reproduce, simply setup khepri, point the start_dir at a fly.io volume path, deploy fly.io app and try to put value in khepri.
🧪 Diagnostic Findings:
🧰 Suggested Investigation Points:
Beta Was this translation helpful? Give feedback.
All reactions