An Azure service that provides cloud messaging as a service and hybrid integration.
504 errors in this scenario indicate that requests from Logic Apps to Azure Service Bus are timing out or failing at the gateway level, typically due to connectivity, network, or backend availability issues rather than a problem in the Logic Apps themselves.
Use the following steps to troubleshoot and mitigate:
- Validate Service Bus reachability
- From a machine in the same network context as the Logic Apps (for example, a VM in the same VNet if using integration), browse or
wget:-
https://<yournamespace>.servicebus.windows.net/
-
- A successful connectivity test typically returns an HTTP 400 with a Service Bus XML error payload (for example,
Bad Request. To know more visit https://aka.ms/sbResourceMgrExceptions). This confirms DNS, TLS, and routing are working.
- From a machine in the same network context as the Logic Apps (for example, a VM in the same VNet if using integration), browse or
- Check ports and firewall rules
- Ensure outbound connectivity from Logic Apps’ network path to
*.servicebus.windows.netis not blocked. - Required ports include:
- 443 (HTTPS)
- 5671 and 5672 (AMQP)
- 9354 (Net Messaging/SBMP, if still used)
- From a test host in the same network path, verify ports are open, for example:
- Windows PowerShell:
tnc <yournamespacename>.servicebus.windows.net -port 5671 - Linux:
telnet <yournamespacename>.servicebus.windows.net 5671
- Windows PowerShell:
- If these fail, review NSGs, firewalls, or any custom outbound filtering and allow the required Service Bus endpoints and ports.
- Ensure outbound connectivity from Logic Apps’ network path to
- Check for intermittent packet loss or latency
- If the issue is intermittent, test for dropped packets and latency to Service Bus:
.\psping.exe -n 25 -i 1 -q <yournamespace>.servicebus.windows.net:5671 -nobanner - A high failure rate or large latency spikes indicate network instability that can cause 504s.
- If the issue is intermittent, test for dropped packets and latency to Service Bus:
- Verify Logic Apps and Service Bus configuration
- Confirm Logic Apps are targeting the correct Service Bus namespace and entity (queue/topic) and that the namespace actually exists and is spelled correctly.
- If using IP allowlists or private endpoints on Service Bus, ensure the Logic Apps’ outbound IPs or VNet are correctly allowed.
- Consider backend upgrades/restarts and retry behavior
- Service Bus backend upgrades/restarts can cause brief throttling, dropped requests, or short disconnections.
- Use the built‑in retry policies in the Service Bus SDK or configure retries in Logic Apps so transient issues are automatically retried.
- If the problem persists
- Capture a network trace (for example, with Wireshark) from a test host reproducing the issue to see where the timeout occurs.
- If connectivity tests and configuration look correct but 504s continue across multiple Logic Apps, open a support case with Microsoft Support and provide:
- Namespace name and region (Central France)
- Approximate start time (08:00) and correlation/Tracking IDs from failed calls
- Results of connectivity and port tests
References: