Lsyncd를 통해 동기화 된 두 개의 동일한 서버 (A와 B)가 있습니다. 주 서버 A는 Apache, Redis 및 RDS로 구성된 Magento 1.9.1 CE를 사용하며 FPC를 사용합니다. 나는 admin을 위해 A를 만들고 B는 front를 위해 custom admin url로 구성했다. varis와 app/etc/local.xml을 제외한 모든 디렉터리를 동기화했습니다. B는 redis 구성을 약간 수정했습니다.Magento 관리자/전면 분할 서버 Redis 오류
B는 A의 redis 인스턴스에 연결됩니다. Redis는 백엔드 캐시 및 세션 저장소로 구성됩니다. 캐시 관리에서 모든 캐시 유형을 사용할 수 없도록 설정했는데 제대로 작동했지만 제대로 작동 할 때 B에서 redis 오류가 발생했습니다. '구성'캐시 유형이 사용 중지되었으며 오류가 사라졌습니다.
신비한 것이 있습니다; 'Configuration'캐시 유형을 활성화 한 다음 redis에서 'flushall'을 수행하면; 어느 서버 A 또는 B가 먼저로드되고 백엔드 캐시 키가 만들어지며 다른 하나는이 오류가 발생합니다. A가 처음으로로드되고 B가 다시 읽기 오류 인 경우를 말합니다. 그리고 redis에서 flushall이 수행되고 B가 먼저로드되면 A는 redis 오류를 갖습니다.
뭐가 잘못 됐는지 모르겠습니다.
<session_save>db</session_save>
<cache>
<backend>Mage_Cache_Backend_Redis</backend>
<backend_options>
<server>127.0.0.1</server>
<port>6379</port>
<database>0</database>
<password>SOME_PASSWORD</password>
<force_standalone>0</force_standalone> <!-- 0 for phpredis, 1 for standalone PHP -->
<connect_retries>3</connect_retries> <!-- Reduces errors due to random connection failures -->
<automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
<compress_data>1</compress_data> <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_tags>1</compress_tags> <!-- 0-9 for compression level, recommended: 0 or 1 -->
<compress_threshold>20480</compress_threshold> <!-- Strings below this size will not be compressed -->
<compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->
<persistent>1</persistent> <!-- persistence value, 0: not in use, > 0 used as persistence ID -->
</backend_options>
</cache>
<redis_session> <!-- All options seen here are the defaults -->
<host>127.0.0.1</host>
<port>6379</port>
<password>SOME_PASSWORD</password> <!-- Specify if your Redis server requires authentication -->
<timeout>2.5</timeout> <!-- This is the Redis connection timeout, not the locking timeout -->
<persistent></persistent> <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
<db>1</db> <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
<compression_threshold>2048</compression_threshold> <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 -->
<compression_lib>gzip</compression_lib> <!-- gzip, lzf or snappy -->
<log_level>4</log_level> <!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) -->
<max_concurrency>6</max_concurrency> <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
<break_after_frontend>5</break_after_frontend> <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
<break_after_adminhtml>30</break_after_adminhtml>
<bot_lifetime>7200</bot_lifetime> <!-- Bots get shorter session lifetimes. 0 to disable -->
</redis_session>
문제는 다른 URL 사이에 공유하지 않는 것 백엔드 캐시 즉 데이터베이스 0 함께 : 여기 내 레디 스 구성입니다.
레디 스 오류는 다음과 같습니다 B의 local.xml에 내가 별도의 데이터베이스를 사용하는 경우
그러나, 그것은 아무 문제가없는 것보다 백엔드 캐시 2 말할 수 있습니다. A와 B 모두에 대해 동일한 백엔드 캐시 데이터베이스를 사용하고 싶습니다. 아무도 여기에 무슨 일이 일어나는지 이해할 수 있습니까?
감사합니다.