What to do if php redis data is lost

藏色散人
Release: 2023-03-17 13:18:01
Original
1922 people have browsed it

php redis data loss solution: 1. Find "/etc/sysctl.conf"; 2. Add "vm.overcommit_memory = 1"; 3. Use "sysctl -p" to make the configuration effective; 4. , just restart the linux server.

What to do if php redis data is lost

The operating environment of this tutorial: linux5.9.8 system, PHP version 8.1, Dell G3 computer.

php What to do if redis data is lost?

Redis data is lost after the Linux server is restarted

Direct solution:

1. Find /etc/sysctl.conf

vim /etc/sysctl.conf
Copy after login

2. Add

vm.overcommit_memory = 1
Copy after login

3.wq to the last line and save it. Use sysctl -p to make the configuration effective.

sysctl -p
Copy after login

will return the added line, indicating that the addition is successful.

After the Linux server is restarted, the redis data will not be lost.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What to do if php redis data is lost. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template