swagger-stats icon indicating copy to clipboard operation
swagger-stats copied to clipboard

Request timeout

Open gombosg opened this issue 5 years ago • 2 comments

When the server never gives a response (the request times out for whatever reason), api_all_request_in_processing_total is never decreased. Should I add a timeout to it? It can be long e.g. 250s, we could cancel it in countResponse. The point for this would be to pinpoint long-standing or stuck requests but they all time out after some time.

The current workaround is querying with

api_all_request_in_processing_total - min_over_time(api_all_request_in_processing_total[5m])

gombosg avatar May 31 '19 12:05 gombosg

Gonna test this https://github.com/gombosg/swagger-stats/tree/inflight-timeout

gombosg avatar May 31 '19 14:05 gombosg

@sv2 there is a HTTP timeout on most clients but Node.js also has a default setting of 120s. Does swagger-stats record if the socket times out? Or it simply counts as a server error?

gombosg avatar Jun 06 '19 14:06 gombosg