Skip to content

Commit

Permalink
Merge pull request #2214 from richfaj/RetryConfigCheck
Browse files Browse the repository at this point in the history
Detection for recommended transport retry configuration
  • Loading branch information
dpaulson45 authored Nov 4, 2024
2 parents 6d715ca + 642bc9e commit 43c3921
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,26 @@ function Invoke-AnalyzerFrequentConfigurationIssues {
Add-AnalyzedResultInformation @params
}

if ($null -ne $exchangeInformation.GetTransportService) {
if ($exchangeInformation.GetTransportService.MaxPerDomainOutboundConnections -lt 40) {
$params = $baseParams + @{
Name = "MaxPerDomainOutboundConnections"
Details = "Value set to $($exchangeInformation.GetTransportService.MaxPerDomainOutboundConnections), which is less than the recommended value of 40. `r`n`t`tMore details: https://aka.ms/HC-TransportRetryConfigCheck"
DisplayWriteType = "Yellow"
}
Add-AnalyzedResultInformation @params
}

if ($exchangeInformation.GetTransportService.MessageRetryInterval -gt [System.TimeSpan]::FromMinutes(5)) {
$params = $baseParams + @{
Name = "MessageRetryInterval"
Details = "Value set to $($exchangeInformation.GetTransportService.MessageRetryInterval), which is greater than the recommended value of 5 minutes. `r`n`t`tMore details: https://aka.ms/HC-TransportRetryConfigCheck"
DisplayWriteType = "Yellow"
}
Add-AnalyzedResultInformation @params
}
}

$edgeKey = $exchangeInformation.ApplicationConfigFileStatus.Keys | Where-Object { $_ -like "*\EdgeTransport.exe.config" }
$antiMalwareKey = $exchangeInformation.FileContentInformation.Keys | Where-Object { $_ -like "*\Monitoring\Config\AntiMalware.xml" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ function Get-ExchangeInformation {
Write-Verbose "Failed to run Test-ServiceHealth"
Invoke-CatchActions
}

try {
$getTransportService = Get-TransportService -Identity $Server -ErrorAction Stop
} catch {
Write-Verbose "Failed to run Get-TransportService"
Invoke-CatchActions
}
}

Write-Verbose "Checking if FIP-FS is affected by the pattern issue"
Expand Down Expand Up @@ -225,6 +232,7 @@ function Get-ExchangeInformation {
ExtendedProtectionConfig = $extendedProtectionConfig
ExchangeConnectors = $exchangeConnectors
ExchangeServicesNotRunning = [array]$exchangeServicesNotRunning
GetTransportService = $getTransportService
ApplicationPools = $applicationPools
RegistryValues = $registryValues
ServerMaintenance = $serverMaintenance
Expand Down
24 changes: 24 additions & 0 deletions docs/Diagnostics/HealthChecker/TransportRetryConfigCheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Transport Retry Configuration Check

This check verifies that the Transport Service retry configuration and max outbound connections per domain are set to the recommended values. When these values are not set to the recommended values, it can cause mail queueing or longer than expected delivery time when a transient failure occurs.

This check validates the following settings in the `Get-TransportService` configuration:

- `MaxPerDomainOutboundConnections` is set to 40 or greater
- `MessageRetryInterval` is set to 5 minutes or less

## MaxPerDomainOutboundConnections

This setting controls the number of outbound connections that can be open for a single destination domain at one time. When this setting is too low and connections are exhausted, it will cause mail to queue up in the transport service and cause delays in mail delivery. This is most noticeable when mail is sent to a single destination such as in an Office 365 hybrid environment.

## MessageRetryInterval

This setting controls the interval at which the transport service will retry sending a message that has failed to send due to a transient error. When this setting is too high, it can cause mail to queue up unnecessarily. Retrying sooner in most cases will allow the message to be delivered in a timely manner.

## Included in HTML Report?

Yes

## Additional resources

[Email messages are stuck in Exchange Server queues for several minutes](https://aka.ms/TransportRetryConfig)
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ nav:
- ADSiteCount: Diagnostics/HealthChecker/ADSiteCount.md
- ExchangeComputerMembership: Diagnostics/HealthChecker/ExchangeComputerMembership.md
- UnifiedContentCleanup: Diagnostics/HealthChecker/UnifiedContentCleanup.md
- TransportRetryConfigCheck: Diagnostics/HealthChecker/TransportRetryConfigCheck.md
- ManagedAvailabilityTroubleshooter: Diagnostics/ManagedAvailabilityTroubleshooter.md
- Test-ExchAVExclusions: Diagnostics/Test-ExchAVExclusions.md
- Hybrid:
Expand Down

0 comments on commit 43c3921

Please sign in to comment.