2016-07-21 11 views
0

私はMagento for Magentoをパフォーマンス向上のために使用しようとしていましたが、Magneto CE 1.9.2.4のRedisに問題があります。私は時々、それはページをロードするのに約1分を要したことができ、Redisのを使用した場合、数時間後にMagento Redis session問題:数時間後にウェブサイトが遅くなる

私のウェブサイトは遅くなります。管理ゾーンがnormaly動作することを奇妙な。

私はeasyengineスタックを使用して、サーバーにメインの依存関係をインストールしています.hhvmはPHPコンパイラ、nginxはウェブサーバー、redisはキャッシュサーバーです。

サーバーOS:Ubuntuの14.04 CPU:4×2.40 GHzの RAM:3072メガバイト+ 384メガバイトプラス+ 1536メガバイトのSWAP(3261メガバイトを使用して)

server ram usage

マイlocal.xmlの設定:

<config> 
    <global> 
     <install> 
      <date><![CDATA[Wed, 27 Apr 2016 21:17:58 +0000]]></date> 
     </install> 
     <crypt> 
      <key><![CDATA[***********]]></key> 
     </crypt> 
     <disable_local_modules>false</disable_local_modules> 
     <resources> 
      <db> 
       <table_prefix><![CDATA[]]></table_prefix> 
      </db> 
      <default_setup> 
       <connection> 
        <host><![CDATA[localhost]]></host> 
        <username><![CDATA[*********]]></username> 
        <password><![CDATA[*********]]></password> 
        <dbname><![CDATA[*********]]></dbname> 
        <initStatements><![CDATA[SET NAMES utf8]]></initStatements> 
        <model><![CDATA[mysql4]]></model> 
        <type><![CDATA[pdo_mysql]]></type> 
        <pdoType><![CDATA[]]></pdoType> 
        <active>1</active> 
       </connection> 
      </default_setup> 
     </resources> 
     <session_save><![CDATA[db]]></session_save> 

    <!-- redis cache --> 
     <cache> 
      <backend>Cm_Cache_Backend_Redis</backend> 
      <backend_options> 
      <server>127.0.0.1</server>        
      <port>6379</port> 
      <persistent></persistent>         
      <database>0</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> 

    <!-- redis session storage --> 
     <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>1</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> 
    </global> 

    <admin> 
     <routers> 
      <adminhtml> 
       <args> 
        <frontName><![CDATA[admin]]></frontName> 
       </args> 
      </adminhtml> 
     </routers> 
    </admin> 
</config> 

HHVM php.iniの設定:

; php options 
session.save_handler = files 
session.save_path = /var/lib/hhvm/sessions 
session.gc_maxlifetime = 1440 

; hhvm specific 
hhvm.log.level = Warning 
hhvm.log.always_log_unhandled_exceptions = true 
hhvm.log.runtime_error_reporting_level = 8191 
hhvm.mysql.typed_results = false 
hhvm.log.header = true 
hhvm.log.natives_stack_trace = true 
hhvm.mysql.socket = /var/run/mysqld/mysqld.sock 
hhvm.pdo_mysql.socket = /var/run/mysqld/mysqld.sock 
hhvm.mysqli.socket = /var/run/mysqld/mysqld.sock 
hhvm.log.header = true 
hhvm.log.natives_stack_trace = true 

MySQLの設定:

[client] 
port  = 3306 
socket  = /var/run/mysqld/mysqld.sock 

[mysqld_safe] 
socket  = /var/run/mysqld/mysqld.sock 
nice  = 0 

[mysqld] 
user  = mysql 
pid-file = /var/run/mysqld/mysqld.pid 
socket  = /var/run/mysqld/mysqld.sock 
port  = 3306 
basedir  = /usr 
datadir  = /var/lib/mysql 
tmpdir  = /tmp 
lc_messages_dir = /usr/share/mysql 
lc_messages = en_US 
skip-external-locking 

max_connections  = 100 
connect_timeout  = 5 
wait_timeout  = 600 
max_allowed_packet = 16M 
thread_cache_size  = 128 
sort_buffer_size = 4M 
bulk_insert_buffer_size = 16M 
tmp_table_size  = 32M 
max_heap_table_size = 32M 

myisam_recover_options = BACKUP 
key_buffer_size  = 128M 
#open-files-limit = 2000 
table_open_cache = 400 
myisam_sort_buffer_size = 512M 
concurrent_insert = 2 
read_buffer_size = 2M 
read_rnd_buffer_size = 1M 

query_cache_limit  = 128K 
query_cache_size  = 64M 

log_warnings  = 2 

slow_query_log_file = /var/log/mysql/mariadb-slow.log 
long_query_time = 10 
log_slow_verbosity = query_plan 

log_bin   = /var/log/mysql/mariadb-bin 
log_bin_index  = /var/log/mysql/mariadb-bin.index 

expire_logs_days = 10 
max_binlog_size   = 100M 

default_storage_engine = InnoDB 

innodb_buffer_pool_size = 256M 
innodb_log_buffer_size = 8M 
innodb_file_per_table = 1 
innodb_open_files = 400 
innodb_io_capacity = 400 
innodb_flush_method = O_DIRECT 

[mysqldump] 
quick 
quote-names 
max_allowed_packet = 16M 

[isamchk] 
key_buffer  = 16M 

!includedir /etc/mysql/conf.d/ 

答えて

0

STEP 1ロックRedisのセッション:

があなたのMagentoのlocal.xmlに<disable_locking>を追加

<session_save><![CDATA[db]]></session_save> 
<redis_session> 
. 
. 
    <disable_locking>1</disable_locking> 
</redis_session> 

STEP 2:

NB:Cm_RedisSessionの古いバージョンではこの機能はありません。 は、見つけるアプリ/コード/コミュニティ/ cmで/ RedisSession /モデル/ Session.phpを開き、「disable_locking」を探します。

grep disable_locking app/code/community/Cm/RedisSession -r app/code/community/Cm/RedisSession/Model/Session.php::! (strlenを( "{$ CONFIG->下降( 'disable_locking')}")(ブール値) "{$ CONFIG->下降( 'disable_locking')}":?自己:: DEFAULT_DISABLE_LOCKING)。

If you see the above, it will work with no further action. This updated code is bundled as of Magento CE 1.9 or EE 1.14. 
If you don’t see that, then the module needs to be updated. 
+0

こんにちはRebin、ご返信ありがとうございます。私は正確に無効にロックが何をすべきか、聞いてもいいですか? –

関連する問題