Home >Database >Redis >How to solve php redis data loss

How to solve php redis data loss

王林
王林forward
2023-05-29 18:16:38743browse

#php redis data loss solution: 1. Find "/etc/sysctl.conf"; 2. Add "vm.overcommit_memory = 1"; 3. Use "sysctl -p "Make the configuration take effect; 4. Restart the Linux server.

Redis data is lost after the Linux server is restarted

Direct solution:

1. Find /etc/sysctl.conf

vim /etc/sysctl.conf

2. Add

vm.overcommit_memory = 1

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

sysctl -p

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

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

What are the tools for building a PHP development environment?

1. phpStudy is the most commonly used development environment for novices to get started.

2. WampServer, WampServer is also as simple to operate as phpStudy and is more friendly to novices.

3. XAMPP, XAMPP (Apache MySQL PHP PERL) is a powerful website building integration software package.

4. MAMP, MAMP is divided into two types: MAMP and MAMP Pro for Mac.

5. Pagoda Panel, Pagoda Panel is a server management software that supports Windows and Linux systems.

6. UPUPW, UPUPW is currently the most distinctive web server PHP suite under the Windows platform.

The above is the detailed content of How to solve php redis data loss. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete