Skip to main content
This page applies only to the embedded Redis in self-hosted Opal. If you use an external Redis, your provider controls these settings.

How Redis recovers after a crash

If the machine running Redis stops suddenly (a kernel panic, a power loss, or a cloud host failure), the end of Redis’s data file can be left damaged, and Redis won’t start. Opal sets aof-load-corrupt-tail-max-size to 33554432 bytes (32 MiB). If the damaged end of the file is smaller than this limit, Redis deletes everything from the first damaged byte to the end of the file, starts, and logs corrupt AOF file tail. If it’s larger, Redis doesn’t start and leaves the file as it is. See If Redis still won’t start. The deleted data is usually background work queued just before the crash, such as an access change or a notification, and that work may not run. Contact Opal support if an access change made just before a crash didn’t take effect.

Check the setting

Replace <namespace> with the namespace you installed Opal in and run:
If the command prints 0 or nothing, your Opal version predates this setting. Update Opal to get it.

Change the setting

A higher limit lets Redis recover from more crashes by itself, but each recovery can delete more data. Set the limit to 0 if you want a person to review every damaged file before any data is removed. Changing the limit restarts both Redis deployments without losing data. Background work pauses while they restart.
Go to Config. Under Storage, set Embedded Redis crash repair limit (bytes), then deploy the new version.

After Redis repairs the file

After a host crash, check each Redis pod’s log:
Redis’s automatic repair can leave an unfinished transaction at the end of the file. For each pod that logged the message, rewrite its data file once Opal is back up. This removes the unfinished transaction, so a later restart doesn’t apply part of it:

If Redis still won’t start

If the damage is larger than the limit, the Redis pod restarts in a loop (CrashLoopBackOff). Read the log from its last attempt:
Redis suggests a value for aof-load-corrupt-tail-max-size; the limit must be at least one more than that. Before you change anything, take a snapshot of Redis’s volume, then contact Opal support. After you raise the limit and deploy, delete the crash-looping pod (kubectl delete pod -n <namespace> <pod>) so it picks up the new value; this doesn’t touch its volume. Don’t delete the volume: that removes all queued work.
Last modified on December 1, 2026