Troubleshooting Guide: SQL Server Error 11289 – Forwarded Message Memory Limit Exceeded
Why This Error Happens
This error occurs when SQL Server’s Service Broker attempts to forward a message but the operation would exceed the configured memory ceiling allocated for forwarded messages. This typically happens on intermediary routing servers in a Service Broker topology that are handling a high volume of message traffic relative to available memory, or when the forwarded_message_memory_limit setting is set too conservatively for the current workload. It can also surface after a server migration to Windows Server 2025 where default memory allocation policies differ from legacy configurations, causing previously sufficient limits to become inadequate.
Step-by-Step Resolution Guide
Step 1: Verify Current Service Broker Forwarding Configuration
- Open SQL Server Management Studio (SSMS) and connect to the instance acting as the message forwarder.
- Run the following query to check current broker configuration:
SELECT * FROM sys.configurations WHERE name LIKE '%broker%'; - Confirm that the instance is indeed configured as a forwarder by checking
sys.routesandsys.remote_service_bindingsfor active forwarding routes.
Step 2: Increase the Forwarded Message Memory Limit
- Locate the Service Broker startup parameter responsible for the memory cap; this is often set via trace flag or server-level configuration depending on your SQL Server 2025 build.
- Use
sp_configureto review and adjust related memory settings: EXEC sp_configure 'show advanced options', 1; RECONFIGURE;EXEC sp_configure 'max server memory (MB)', [new_value]; RECONFIGURE;- If a dedicated forwarding memory parameter exists in your build, update it via the registry path
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL17.MSSQLSERVER\MSSQLServer\Parametersand restart the service.
Step 3: Reduce Message Backlog and Clear Stale Queues
- Open a query window and check queue depth with:
SELECT COUNT(*) FROM sys.transmission_queue; - Identify and purge stalled or poison messages that are consuming forwarding memory unnecessarily.
- Restart the SQL Server Service Broker task using
ALTER DATABASE [YourDB] SET DISABLE_BROKER; ALTER DATABASE [YourDB] SET ENABLE_BROKER;to clear the in-memory forwarding cache.
Step 4: Restart SQL Server Service and Monitor Memory Allocation
- Open Services.msc on Windows Server 2025 or Windows 11.
- Locate SQL Server (MSSQLSERVER), right-click, and select Restart.
- Monitor memory usage post-restart using Performance Monitor (
perfmon) with the SQLServer:Broker Statistics counter set to confirm forwarded message memory stays within the new limit.
Alternative or Verification Steps
- To verify the fix, generate test traffic through the Service Broker route and confirm Error 11289 no longer appears in the SQL Server Error Log (
EXEC sp_readerrorlog 0, 1, '11289';). - As an alternative, if increasing memory isn’t feasible, redesign the routing topology to distribute forwarding load across multiple instances rather than relying on a single forwarder bottleneck.