I used the code:
when CLIENT_ACCEPTED {
set prev_age 0
}
when HTTP_REQUEST {
set prev_age [IP::stats age]
}
when HTTP_RESPONSE {
set prev_age [IP::stats age]
}
when CLIENT_CLOSED {
set timeout [expr { [IP::idle_timeout] * 1000 } ]
log "Stats age is [IP::stats age] prev age is $prev_age timeout is $timeout"
idle_timeout is in seconds, stats age is in milliseconds
if { [expr [IP::stats age] - $prev_age > $timeout ] } {
log "Client: [IP::remote_addr]:[TCP::remote_port] timed out"
}
}
and found that the timeout is 300000 milliseconds. However, in some cases, which seem to be related to ramcache, the timeout is 5000 milliseconds.