Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection for recommended transport retry configuration #2214

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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