Home > Database > Redis > body text

How to solve php redis data loss

王林
Release: 2023-05-29 18:16:38
forward
723 people have browsed it

#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
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.

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!

Related labels:
source:yisu.com
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!