无限星辰工作室-客户无限互联网动力之源
标题:
discuz+redis 并发提升解决方案(500w pv版)
[打印本页]
作者:
crx349
时间:
2019-3-5 03:29
标题:
discuz+redis 并发提升解决方案(500w pv版)
1.安装redis扩展 和 可视化工具
2.config/config_global.php
$_config['memory']['redis']['server'] = '127.0.0.1';
$_config['memory']['redis']['port'] = 6379;
$_config['memory']['redis']['pconnect'] = 1;
$_config['memory']['redis']['timeout'] = '0';
$_config['memory']['redis']['requirepass'] = 'xmspace.net';
$_config['memory']['redis']['serializer'] = 1;
复制代码
3.source/class/memory/memory_driver_redis.php
搜索:
$this->enable = $connect ? true : false;
if ($this->enable) {
复制代码
改成
$this->enable = $connect ? true : false;
if ($this->enable) {
if ($config['requirepass']) {
$this->obj->auth($config['requirepass']);
}
复制代码
4.性能最大优化:
欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://xmspace.net/)
Powered by Discuz! X3.4