Redis内存溢出后报错的解决办法

故障简介

早上查看Redis日志的时候发现一直在报错

1
2
[1524] 24 Mar 10:00:56.037 * 1 changes in 900 seconds. Saving...
[1524] 24 Mar 10:00:56.037 # Can't save in background: fork: Cannot allocate memory

php程序的错误日志

1
Exception: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error. 

Read More

php-fpm 与 Nginx优化总结

php-fpm参数概述

php-fpm的配置文件在Ubuntu系统中的路径是/etc/php/7.4/fpm/pool.d/www.conf,下面对每个参数的意义进行简要的概述分析。

pm=dynamic

该项共有三种设置方式 static 、 dynamic 、ondemand

Read More