我正在使用 phpredis 设置一个哈希条目,它从 mysql 中提取数据;因为我正在将一些数据从我的 MySQL 数据库迁移到 redis 以便更快地访问,因为我在 redis 中所做的数据/更改量很大(4 GB),它每 5-10 分钟(变量)后崩溃。
日志说:
[4464] 12 Mar 12:20:04 # Background saving terminated by signal 9
[4464] 12 Mar 12:20:04 * 10 changes in 300 seconds. Saving...
[4464] 12 Mar 12:20:05 * Background saving started by pid 9212
[4464] 12 Mar 12:20:05 # Background saving terminated by signal 9
[4464] 12 Mar 12:20:05 * 10 changes in 300 seconds. Saving...
[4464] 12 Mar 12:20:06 * Background saving started by pid 9214
[4464] 12 Mar 12:20:07 # Background saving terminated by signal 9
[4464] 12 Mar 12:20:07 * 10 changes in 300 seconds. Saving...
[10975] 12 Mar 12:43:13 * Server started, Redis version 2.2.12
这让我一次又一次地重新启动 redis,这非常痛苦,我已经将 vm.overcommit 设置为 1。
我在 Ubuntu 12.04 LTS 上使用具有 1.6 GB RAM 的 AWS ec2 小型实例。
请给我一些聪明的解决方案。
提前致谢。