Home / Snippets / Fixing Laravel MISCONF Redis is configured to save RDB snapshots
Fixing Laravel MISCONF Redis is configured to save RDB snapshots cover

Fixing Laravel MISCONF Redis is configured to save RDB snapshots

1.3K

2 years ago

0 comments

In this short snippet, you will learn how to fix/resolve the error "Laravel MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk" on your Laravel project. The main cause of this issue is Redis and since in most Laravel project you will be using it as a "cache" only, you can disable writes and instead get "read" only.

Open Terminal


First, open a terminal and launch Redis CLI by running the command below.
redis-cli

Set Writes to "no"


Now you can stop "writes on bgsave error" to "no" like below to update the settings.
config set stop-writes-on-bgsave-error no

Additional Settings (Optional)


Also, make sure to set the Linux kernel overcommit memory setting to 1.
Add "vm.overcommit_memory = 1" to "/etc/sysctl.conf" and then reboot.
vm.overcommit_memory = 1
If you prefer the command line then run the command "sysctl vm.overcommit_memory=1" for this to take effect immediately.
sysctl vm.overcommit_memory=1

Other Reads

notion avatar

Alaz

Week-end developer currently experimenting with web, mobile, and all things programming.

Topics:

Frontend

Resource

Average

Average

Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this