throttling
3 TopicsRetryQuery not working after throttling
Hi everyone, We are using the recommended approach for throttling. Here is the method we are using to execute the requests: public void ExecuteQueryWithRetry(ClientContext ctx, int retryCount, int backOffInterval, ILog LOG) { DateTime startTimeStamp = DateTime.Now; try { int retryAttempts = 0; int retryAfterInterval = 0; bool retry = false; ClientRequestWrapper wrapper = null; LOG.Debug($"Client Context: {ctx.GetHashCode()}"); LOG.Debug($"Throttled : {Throttled}"); if (Throttled) { while (Throttled) { LOG.Debug("Still throttled..."); Thread.Sleep(100); } Thread.Sleep(new Random().Next(500)); LOG.Debug("Throttled finished"); } while (retryAttempts < retryCount) { try { if (retry && wrapper != null && wrapper.Value != null) { LOG.Debug("Execute request with wrapper value..."); ctx.RetryQuery(wrapper.Value); LOG.Debug("Execute request with wrapper value finished"); Throttled = false; return; } else { LOG.Debug("Execute request..."); ctx.ExecuteQuery(); LOG.Debug("Execute request finished"); Throttled = false; return; } } catch (WebException ex) { var response = ex.Response as HttpWebResponse; // Check for throttling if (response != null && (response.StatusCode == (HttpStatusCode)429 || response.StatusCode == (HttpStatusCode)503)) { Throttled = true; wrapper = (ClientRequestWrapper)ex.Data["ClientRequest"]; retry = true; string retryAfterHeader = response.GetResponseHeader("Retry-After"); if (!string.IsNullOrEmpty(retryAfterHeader)) { if (!Int32.TryParse(retryAfterHeader, out retryAfterInterval)) { retryAfterInterval = backOffInterval; } } else { retryAfterInterval = backOffInterval; } LOG.Warn($"We got throttled! Will back off for {retryAfterInterval} seconds."); } else { LOG.Debug(ex.StackTrace); throw; } } Thread.Sleep(retryAfterInterval * 1000); retryAttempts++; } throw new MaximumRetryAttemptedException($"Maximum retry attempts '{retryCount}' has been attempted."); } finally { if (LOG.IsDebugEnabled) { TimeSpan duration = DateTime.Now - startTimeStamp; LOG.Debug($"Executed CSOM query in [{duration.TotalMilliseconds.ToString("0.00")}] ms"); } } } We got the 429 error and after that we wait the recommended time until we execute again the request. The request is re-executed using the RetryQuery method. After the method is called, we got no error but the request is not executed. Do you have any ideas why we encounter this problem?1.8KViews0likes2CommentsServer 2019 throttle outgoing mails
Hi all! Environment: We have a hybrid deployment. I need to throttle a user outgoing mails on the on-premise servers. We are using 2019 version, a mailbox and a sperate edge server. Goal: Throttle e-mails sending 2 email/minute, for test user. I do not know what happens exactly when the throttling happens. The goal is the server to accept more emails than 2 email/minute than send out them not as one big bulk mail but with some delay. For example if you send one mail with 10 recipients, send the mails out 2/mail/minute. Actions: Created test user, crated test throttling policy. Set the test policy on the test user. The policy is copied from default. Modified parameters are message rate limit: 2, owa max concurerency: 1. The messages are still not throttled. What am I missing? I know the policy is not taking affect immediate, it is already did, tested with recipient rate limit. Or somehow should I use, some connector limits? Or modify the whole server back pressure limits (if it is possible) like number messages in submission queue? https://learn.microsoft.com/en-us/exchange/mail-flow/back-pressure?view=exchserver-2019#number-of-messages-in-the-submission-queue Any ideas are welcome.993Views0likes1CommentSet-SPOTenant : The operation has timed out and Set-SPOSite : The remote server returned an error: (
I am trying to run the below command but I get the below error: ,(Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'") | Set-SPOTenant -ConditionalAccessPolicy AllowLimitedAccess Set-SPOTenant : The operation has timed out. Any ideas how I can get around this error? I have also tried to loop through each site but I sometimes get the below error as well when looping through. Set-SPOSite : The remote server returned an error: (429). I presume some sort of throttling is going on with SPO? How can I get around this?2.2KViews0likes3Comments