rakyll / hey

HTTP load generator, ApacheBench (ab) replacement
Apache License 2.0
18.18k stars 1.2k forks source link

context deadline exceeded (Client.Timeout exceeded while awaiting headers) #277

Open rthamrin opened 2 years ago

rthamrin commented 2 years ago

I got an error context deadline exceeded (Client.Timeout exceeded while awaiting headers error before finish the request.

hey -n 1000 -q 2 -c 1 http://web1.com -A

summary:

  Total:    678.5024 secs

  Slowest:  15.0063 secs

  Fastest:  0.0005 secs

  Average:  0.1635 secs

  Requests/sec: 1.4738

  Total data:   168300 bytes

  Size/request: 168 bytes

Response time histogram:

  0.001 [1] |

  1.501 [964]   |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

  3.002 [6] |

  4.502 [11]    |

  6.003 [8] |

  7.503 [3] |

  9.004 [2] |

  10.505 [2]    |

  12.005 [0]    |

  13.506 [0]    |

  15.006 [1]    |

Latency distribution:

  10% in 0.0009 secs

  25% in 0.0011 secs

  50% in 0.0014 secs

  75% in 0.0016 secs

  90% in 0.0020 secs

  95% in 0.0031 secs

  99% in 5.0033 secs

Details (average, fastest, slowest):

  DNS+dialup:   0.0000 secs, 0.0005 secs, 15.0063 secs

  DNS-lookup:   0.0000 secs, 0.0000 secs, 0.0004 secs

  req write:    0.0000 secs, 0.0000 secs, 0.0005 secs

  resp wait:    0.1634 secs, 0.0005 secs, 15.0063 secs

  resp read:    0.0000 secs, 0.0000 secs, 0.0024 secs

Status code distribution:

  [200] 997 responses

  [504] 1 responses

Error distribution:

  [2]   Get "http://web1.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
MarcoBeer commented 2 years ago

I have the same problem ,Is it a bug?

MarcoBeer commented 2 years ago

I have the same problem ,Is it a bug?

kdeggelman commented 1 year ago

I believe this happens when the requests hit hey's timeout limit. From the docs you can specify a longer timeout with the -t option:

-t Timeout for each request in seconds. Default is 20, use 0 for infinite.