cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

ui: enqueue range endpoint times out after 60s

Open piyush-singh opened this issue 7 years ago • 5 comments

Describe the problem

While troubleshooting an issue, @rkruze ran into a problem while manually enqueueing a range for GC via the enqueue HTTP endpoint. The range that Roko was attempting to GC took longer than 60s to GC, so the page timed out. It was unclear if the operation succeeded or not, and Roko and the customer ended up having to hit the endpoint using curl which isn't the greatest experience.

To Reproduce

See #42625

Expected behavior We should increase the timeout interval here. Will need to check with the KV team about an appropriate threshold. We may want to avoid timing out altogether, but not yet sure of the implications of that generally.

piyush-singh avatar Dec 02 '19 18:12 piyush-singh

The calls to the "Enqueue Range" endpoint (but probably all of them) set a 30s gRPC timeout header:

curl 'http://xxxx:xxx/_admin/v1/enqueue_range' -H 'Accept: application/x-protobuf' -H 'Accept-Language: en-US,en;q=0.5' -H 'Content-Type: application/x-protobuf' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data $'\x08\x00\x12\x02gc\x18\x07 \x01'

These queue runs can take longer, and make this endpoint limited in utility (we just dealt with this while debugging user issues). It is important to wait for that RPC for as long as it takes, in particular since the gRPC timeout also cancels the work server-side, meaning that the work won't get done.

Want to bump the priority on this - this has bitten us more than once. It's the thing I would fix right now if I knew how to.

tbg avatar Feb 27 '20 15:02 tbg

@tbg What would a sane default be for this (it seems to be 30s now)? I think for the moment I'm going to increase it to something before I do the work to untangle it to wait for the request to finish.

nathanstilwell avatar Mar 03 '20 17:03 nathanstilwell

An hour? That should cover anything I can ever anticipate needing. Thanks!

tbg avatar Mar 03 '20 18:03 tbg

fixed by #45667

nathanstilwell avatar Mar 05 '20 23:03 nathanstilwell