Skip to content

Commit a1921b5

Browse files
Merge pull request #300753 from Ankit-MSFT/docs-editor/service-bus-troubleshooting-gu-1748966061
Update service-bus-troubleshooting-guide.md
2 parents 503bb0d + 2640ffb commit a1921b5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

articles/service-bus-messaging/service-bus-troubleshooting-guide.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ This issue occurs most often in interop scenarios when receiving a message sent
121121
Autolock renewal relies on the system time to determine when to renew a lock for a message or session. If your system time isn't accurate, for example, your clock is slow, then lock renewal might not happen before the lock is lost. Ensure that your system time is accurate if autolock renewal isn't working.
122122

123123
### Processor appears to hang or have latency issues when using high concurrency
124-
Tthread starvation usually causes this behavior, particularly when using the session processor and using a very high value for [MaxConcurrentSessions][MaxConcurrentSessions], relative to the number of cores on the machine. The first thing to check would be to make sure you aren't doing sync-over-async in any of your event handlers. Sync-over-async is an easy way to cause deadlocks and thread starvation. Even if you aren't doing sync over async, any pure sync code in your handlers could contribute to thread starvation. If you determined that isn't the issue, for example, because you have pure async code, you can try increasing your [TryTimeout][TryTimeout]. It relieves pressure on the thread pool by reducing the number of context switches and timeouts that occur when using the session processor in particular. The default value for [TryTimeout][TryTimeout] is 60 seconds, but it can be set all the way up to 1 hour. We recommend testing with the `TryTimeout` set to 5 minutes as a starting point and iterate from there. If none of these suggestions work, you simply need to scale out to multiple hosts, reducing the concurrency in your application, but running the application on multiple hosts to achieve the desired overall concurrency.
124+
Thread starvation usually causes this behavior, particularly when using the session processor and using a very high value for [MaxConcurrentSessions][MaxConcurrentSessions], relative to the number of cores on the machine. The first thing to check would be to make sure you aren't doing sync-over-async in any of your event handlers. Sync-over-async is an easy way to cause deadlocks and thread starvation. Even if you aren't doing sync over async, any pure sync code in your handlers could contribute to thread starvation. If you determined that isn't the issue, for example, because you have pure async code, you can try increasing your [TryTimeout][TryTimeout]. It relieves pressure on the thread pool by reducing the number of context switches and timeouts that occur when using the session processor in particular. The default value for [TryTimeout][TryTimeout] is 60 seconds, but it can be set all the way up to 1 hour. We recommend testing with the `TryTimeout` set to 5 minutes as a starting point and iterate from there. If none of these suggestions work, you simply need to scale out to multiple hosts, reducing the concurrency in your application, but running the application on multiple hosts to achieve the desired overall concurrency.
125125

126126
Further reading:
127127
- [Debug thread pool starvation][DebugThreadPoolStarvation]
@@ -181,13 +181,13 @@ The following steps help you with troubleshooting connectivity/certificate/timeo
181181
</Detail>
182182
</Error>
183183
```
184-
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 and 5672 (AMQP) and 9354 (Net Messaging/SBMP). Depending on the library you use, other ports are also used. Here's the sample command that check whether the 5671 port is blocked. C
184+
- Run the following command to check if any port is blocked on the firewall. Ports used are 443 (HTTPS), 5671 and 5672 (AMQP) and 9354 (Net Messaging/SBMP). Depending on the library you use, other ports are also used. Here's the sample command that check whether the 5671 port is blocked.
185185

186186
```powershell
187187
tnc <yournamespacename>.servicebus.windows.net -port 5671
188188
```
189189

190-
On Linux:
190+
On Linux:
191191

192192
```shell
193193
telnet <yournamespacename>.servicebus.windows.net 5671
@@ -285,7 +285,6 @@ See the following articles:
285285

286286
[ServiceBusMessageBatch]: /dotnet/api/azure.messaging.servicebus.servicebusmessagebatch
287287
[SendMessages]: /dotnet/api/azure.messaging.servicebus.servicebussender.sendmessagesasync
288-
[ServiceBusMessageBatch]: /dotnet/api/azure.messaging.servicebus.servicebusmessagebatch
289288
[ServiceBusReceiver]: /dotnet/api/azure.messaging.servicebus.servicebusreceiver
290289
[ServiceBusSessionReceiver]: /dotnet/api/azure.messaging.servicebus.servicebussessionreceiver
291290
[MessageBody]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Azure.Messaging.ServiceBus/samples/Sample14_AMQPMessage.md#message-body

0 commit comments

Comments
 (0)