在我们的RHEL5 64位服务器上,服务大容量的10 + GB文件和字节范围请求似乎存在问题。 我注意到的问题是范围请求超过10GB(十千兆字节)标记的范围超时,而在此之前的文件中的任何一点的范围请求是快速的。
我一直在使用java servlet和apache HTTPD(2.2)在tomcat上进行testing,并且两者都失败
如果我设置了一个testing,在每个10GB的范围内执行curl范围请求,那么它在10GB(或者更准确地说,9.313231GB?
$ curl -w '%{time_total}\n' --header 'Range: bytes=9999900000-10000000000' http://ourserver.com/bam/file.bam --fail --silent --show-error 22.840 curl: (56) Recv failure: Operation timed out
在这个范围请求总是失败。 文件中10GB之前的任何范围请求非常快,没有错误。
我猜在tomcat和apache中发生的事实让我怀疑它不是apache或tomcat的configuration问题,所以有什么线索可以发生什么?
脚本进行testing
#!/bin/bash set -evx begin=9900000000 grab=100000 iter=100000 max=16000000000 url=$1 for i in `seq -f "%.0f" $begin $iter $max`; do i2=$(($i+$grab)) echo -en "$i\t$i2\t"; curl -so /dev/null -w "%{time_total}\n" --header "Range: bytes=$i-$i2" $url --fail --silent --show-error done;
所有范围请求的图片高达10GB,其中20秒表示超时