varnish 400 503错误的原因及解决方法(转)

varnish运行中频繁出现400,503错误

400错误出现,是因为varnish认为客户端请求header行数及长度过大,其默认最大接受的请求header行数为64,最大长度(所有请求header行长度之和)为2048,解决这个问题比较简单,在varnish启动参数中加入:

-p http_max_hdr=256

-p http_req_hdr_len=8192

再重启varnish, 即可解决其400错误

503错误,这是因为varnish对后端服务器响应header有限制,默认长度是2048,可将其调大一些

-p http_resp_hdr_len=8192

再重启之,即可解决这个问题.

转自:http://zhangxugg-163-com.iteye.com/blog/1153267

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Protected by WP Anti Spam