varnish排错

简介:
   ●Troubleshooting varnishvarnish排错)

         有时候varnish会出错,为了使您知道该检查哪里,您可以检查varnishlog/var/log/syslog/,var/log/messages 这里可以发现一些信息,知道varnish怎么了。
         When varnish won’t start

                   有些时候,varnish不能启动。这里有很多varnish不能启动的原因,通常我们可以观看/dev/null的权限和是否其他软件占用了端口。
                   使用debug模式启动varnish,然后观看发生了什么:
varnishd -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000  -a 0.0.0.0:8080 –d

提示-d选项,它将给您更多的信息关于接下来发生了什么。让我们看看如果其他程序暂用了varnish的端口,它将显示什么:
# varnishd -n foo -f /usr/local/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000  -a 0.0.0.0:8080 -d

storage_malloc: max size 1024 MB.

Using old SHMFILE

Platform: Linux,2.6.32-21-generic,i686,-smalloc,-hcritbit

200 193

-----------------------------

Varnish HTTP accelerator CLI.

-----------------------------

Type 'help' for command list.

Type 'quit' to close CLI session.

Type 'start' to launch worker process.

现在varnish的主程序已经运行,在debug模式中,cache现在还没有启动,现在您在终端中使用“start”命令来让主程序开启cache功能
start

bind(): Address already in use

300 22

Could not open sockets

在这里,我们发现一个问题。Varnish要使用的端口被HTTP使用了。
Varnish is creashing

varnish宕掉的时候。
Varnish gives me guru mediation

首先查找varnishlog,这里可能会给您一些信息。
Varnish doesn’t cache

请参考“提高命中率”这章。




本文转自 fenghao.cn 51CTO博客,原文链接:http://blog.51cto.com/linuxguest/360528,如需转载请自行联系原作者
目录
相关文章
|
21天前
|
Linux
linux环境下安装varnish
linux环境下安装varnish
|
30天前
|
存储 缓存 运维
LAMP+Varnish缓存详解(一)——Varnish简介
LAMP+Varnish缓存详解(一)——Varnish简介
18 0
|
Web App开发 存储 缓存
|
缓存 监控 JavaScript
|
Web App开发 缓存 测试技术

热门文章

最新文章