我一整天都在撞墙。
我正在使用以下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 ....(在我的情况下缓存:http://localhost/help)
我知道它们存在是因为我可以监视redis-cli以获取nginx redis请求,复制"get" "cache: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
这是否适用于任何其他人,或者是否有人可以帮助我朝正确的方向发展?
提前致谢
答案 0 :(得分:0)
对于将来阅读此内容的人。
首先,你好过去了!
其次,结果是nginx pagespeed模块,这种缓存是不兼容的。