【发布时间】:2017-11-02 19:49:59
【问题描述】:
我们遇到了 Redis 停机:
Can't save in background: fork: Cannot allocate memory
我们的网络有一段时间无法使用。
如果 Redis 不可用,我想正确设置 Magento 以回退到磁盘文件缓存中。最好的选择是什么?
我们正在运行 Magento 1.9.3.2 和 Redis 3.2.10,我们的 app/etc/local.xml 缓存和会话设置是:
<cache>
<backend>Cm_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6379</port>
<persistent></persistent>
<database>12</database>
<password></password>
<force_standalone>0</force_standalone>
<connect_retries>1</connect_retries>
<read_timeout>10</read_timeout>
<automatic_cleaning_factor>0</automatic_cleaning_factor>
<compress_data>1</compress_data>
<compress_tags>1</compress_tags>
<compress_threshold>20480</compress_threshold>
<compression_lib>gzip</compression_lib>
<use_lua>0</use_lua>
</backend_options>
</cache>
<session_save>db</session_save>
<redis_session>
<host>127.0.0.1</host>
<port>6379</port>
<password></password>
<timeout>2.5</timeout>
<persistent></persistent>
<db>13</db>
<compression_threshold>2048</compression_threshold>
<compression_lib>gzip</compression_lib>
<log_level>1</log_level>
<max_concurrency>6</max_concurrency>
<break_after_frontend>5</break_after_frontend>
<break_after_adminhtml>30</break_after_adminhtml>
<first_lifetime>600</first_lifetime>
<bot_first_lifetime>60</bot_first_lifetime>
<bot_lifetime>7200</bot_lifetime>
<disable_locking>0</disable_locking>
<min_lifetime>60</min_lifetime>
<max_lifetime>2592000</max_lifetime>
</redis_session>
欢迎所有建议。
【问题讨论】: