diff --git a/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor/GitHubEventClient.cs b/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor/GitHubEventClient.cs
index 2cc7600185b..b0c27ec0d94 100644
--- a/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor/GitHubEventClient.cs
+++ b/tools/github-event-processor/Azure.Sdk.Tools.GitHubEventProcessor/GitHubEventClient.cs
@@ -651,9 +651,9 @@ public SearchIssuesRequest CreateSearchRequest(string repoOwner,
/// OctoKit.SearchIssuesResult
public virtual async Task QueryIssues(SearchIssuesRequest searchIssuesRequest)
{
- int maxTries = 3;
- // 90 seconds
- int sleepDuration = 90000;
+ int maxTries = 5;
+ // 61 seconds
+ int sleepDuration = 61000;
for (int tryNumber = 1; tryNumber <= maxTries; tryNumber++)
{
try
@@ -688,8 +688,10 @@ public virtual async Task QueryIssues(SearchIssuesRequest se
}
else
{
- Console.WriteLine($"QueryIssues, sleeping for {sleepDuration/1000} seconds before retrying.");
- System.Threading.Thread.Sleep(sleepDuration);
+ Console.WriteLine($"QueryIssues, sleeping for {sleepDuration/61} seconds before retrying.");
+ // Task.Delay over Sleep will push the wait into the IO completion state and unblocks the thread
+ // from the threadpool whereas sleep blocks the thread in the threadpool.
+ await Task.Delay(tryNumber * sleepDuration);
}
}
}