Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Nginx缓存,redis\u pass_Nginx_Redis - Fatal编程技术网

Nginx缓存,redis\u pass

Nginx缓存,redis\u pass,nginx,redis,Nginx,Redis,我一整天都在用头撞墙 我正在使用以下nginx配置来测试一些东西 location /help { set $redis_key "cache:$scheme://$host$request_uri"; default_type text/html; redis_pass 127.0.0.1:6379; error_page 404 = @upstream; } 缓存的redis实例中有一个键和值:$scheme。。。。(在我的例子中是缓存:) 我知道它们是存在的,因为我

我一整天都在用头撞墙

我正在使用以下nginx配置来测试一些东西

location  /help {
  set $redis_key "cache:$scheme://$host$request_uri";
  default_type   text/html;
  redis_pass 127.0.0.1:6379;
  error_page 404 = @upstream;
}

缓存的redis实例中有一个键和值:$scheme。。。。(在我的例子中是缓存:)

我知道它们是存在的,因为我可以针对nginx redis请求监视redis cli,复制
“get”缓存:http://localhost/help“
,将其粘贴到另一个redis cli窗口中,并获得预期的响应

nginx带来了问题,它没有得到响应。我再次看到它从内部连接到redis cli->monitor,我知道键和值存在

从nginx错误日志中,我可以看到这一点

2016/04/08 16:52:42 [notice] 9304#0: worker process 6328 exited with  code 0
2016/04/08 16:52:42 [notice] 9304#0: signal 29 (SIGIO) received
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::append
2016/04/08 16:52:49 [notice] 9304#0: signal 17 (SIGCHLD) received
2016/04/08 16:52:49 [alert] 9304#0: worker process 7328 exited on signal 6 (core dumped)
2016/04/08 16:52:49 [notice] 9304#0: start worker process 7516
2016/04/08 16:52:49 [notice] 9304#0: signal 29 (SIGIO) received
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::append
2016/04/08 16:52:50 [notice] 9304#0: signal 17 (SIGCHLD) received
2016/04/08 16:52:50 [alert] 9304#0: worker process 7335 exited on signal 6 (core dumped)
2016/04/08 16:52:50 [notice] 9304#0: start worker process 7544
2016/04/08 16:52:50 [notice] 9304#0: signal 29 (SIGIO) received
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::append
这对其他人有吸引力吗?或者有人能把我踢向正确的方向吗


提前感谢将来阅读此文章的所有人

首先,过去的你好


其次,nginx pagespeed模块和这种缓存不兼容。

你的意思是我们不能用redis进行缓存??