Skip to content

Extend gRPC timeouts for Rake tasks

Stan Hu requested to merge sh-fix-grpc-timeouts-backup into master

In !16926 (merged) we added gRPC timeouts for calls that did not previously have timeouts to prevent Sidekiq queries from getting stuck. In addition, we also made long timeouts 55 seconds for non-Sidekiq requests, but this meant Rake tasks also fell into this bucket. Rake backup tasks with large repositories would fail because the CreateBundle RPC would time out after 55 seconds.

To avoid this trap, we flip the logic of GitalyCall.long_timeout: instead of checking for Sidekiq (or other background jobs), we only lower the timeout to 55 seconds if we're servicing a Web request in Puma or Unicorn.

Closes #22398 (closed)

Edited by Stan Hu

Merge request reports