haproxy 服务端超时时间 timeout server 17000 --后台程序17秒没有响应,返回超时

haproxy 服务端超时时间:

haproxy 配置:
timeout server 17000    --后台程序17秒没有响应,返回超时



Jun 27 09:29:56 localhost haproxy[13593]: 192.168.32.101:43552 [27/Jun/2016:09:29:39.002] www appserver_3000/webhost01_8001 64/0/6/-1/17072 504 194 - - sH-- 0/0/0/0/0 0/0 "GET /admin/api/menu HTTP/1.1"
Jun 27 09:30:13 localhost haproxy[13593]: 192.168.32.101:43558 [27/Jun/2016:09:29:56.300] www appserver_3000/webhost01_8001 59/0/7/-1/17067 504 194 - - sH-- 0/0/0/0/0 0/0 "GET /admin/api/menu HTTP/1.1"





[root@dr-mysql01 test]# cat get.pl 
use  LWP::UserAgent;
 
my $ua = LWP::UserAgent->new;
#$ua->env_proxy('http','http://$ARGV[0]');
$ua->agent("Mozilla/8.0");

my $response = $ua->get('http://www.zjtest6.com/admin/api/menu');


if ($response->is_success) {
 print $response->decoded_content;  # or whatever
}
else {
 die $response->status_line;
}



[root@dr-mysql01 test]# sh ./a1.sh
504 Gateway Time-out at ./get.pl line 14.
Mon Jun 27 09:31:16 CST 2016
504 Gateway Time-out at ./get.pl line 14.
Mon Jun 27 09:31:33 CST 2016

posted @ 2016-06-27 09:36  czcb  阅读(323)  评论(0编辑  收藏  举报