Skip to content

Commit

Permalink
Non-critical support review (#6915)
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisNickels authored Nov 27, 2024
1 parent b8eb64f commit bdf6362
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 34 deletions.
2 changes: 1 addition & 1 deletion monitoring/metrics/in-servicepulse.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Performance Metrics in ServicePulse
summary: Describes how to use ServicePulse to review endpoint performance metrics
reviewed: 2022-03-28
reviewed: 2024-11-27
---

ServicePulse collects and displays performance monitoring data about running endpoints on the Monitoring tab.
Expand Down
8 changes: 4 additions & 4 deletions samples/nhibernate/custom-mappings/sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ Saga data classes can be decorated with [NHibernate.Mapping.Attributes](https://

NHibernate.Mapping.Attributes needs to know what types to scan to generate an NHibernate mapping configuration that can be passed to the NServiceBus NHibernate configuration.

1. Add the NuGet package `NHibernate.Mapping.Attributes`
1. Create a custom NHibernate configuration object.
1. Initialize the attribute mapping (see sample below).
1. Pass it to the NServiceBus NHibernate configuration.
1. Add the NuGet package `NHibernate.Mapping.Attributes`
1. Create a custom NHibernate configuration object.
1. Initialize the attribute mapping (see sample below).
1. Pass it to the NServiceBus NHibernate configuration.

Initialize the NHibernate attribute based mappings:

Expand Down
27 changes: 12 additions & 15 deletions servicepulse/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
---
title: ServicePulse Troubleshooting
summary: ServicePulse installation and common issues troubleshooting
reviewed: 2022-04-21
reviewed: 2024-11-27
component: ServicePulse
---


### ServicePulse is unable to connect to ServiceControl

* See the [ServiceControl release notes](https://github.com/Particular/ServiceControl/releases/) troubleshooting section for guidance on detecting ServiceControl HTTP API accessibility.
* Verify that ServicePulse is trying to access the correct ServiceControl URI (based on ServiceControl instance URI defined in ServicePulse installation settings).
* Check that ServicePulse is not blocked from accessing the ServiceControl URI by firewall settings.
* See the [ServiceControl release notes](https://github.com/Particular/ServiceControl/releases/) troubleshooting section for guidance on detecting ServiceControl HTTP API accessibility.
* Verify that ServicePulse is trying to access the correct ServiceControl URI (based on ServiceControl instance URI defined in ServicePulse installation settings).
* Check that ServicePulse is not blocked from accessing the ServiceControl URI by firewall settings.

### ServicePulse reports empty failed message groups

Expand All @@ -33,13 +32,12 @@ There may be previous versions of assets cached by the browser after updating Se

After a period of inactivity, a web application endpoint is failing with the message:

```
```text
Endpoint has failed to send expected heartbeat to ServiceControl. It is possible that the endpoint could be down or is unresponsive. If this condition persists restart the endpoint.
```

When accessed, the web application is operating as expected. However shortly after accessing the web application, the heartbeat message is restored and indicates the endpoint status as active.


#### Causes and solutions

The issue is due to the way IIS handles application pools. By default after a certain period of inactivity, the application pool is stopped or, under certain configurable conditions, the application pool is recycled. In both cases the ServicePulse heartbeat is not sent anymore until a new web request comes in waking up the web application.
Expand All @@ -64,7 +62,6 @@ Starting from IIS 7.5, the above steps can be combined into one by following the

In some cases, configuring IIS to avoid recycling is not possible. Here, the recommended approach is the second one. It also has the benefit of avoiding the "first user after idle time" wake-up response-time hit.


### Duplicate endpoints appear in ServicePulse after re-deployment

This may occur when an endpoint is re-deployed or updated to a different installation path (a common procedure by deployment managers like Octopus).
Expand All @@ -75,17 +72,17 @@ To address this issue, see [Override host identifier](/nservicebus/hosting/overr

### ServicePulse reports that 0 endpoints are active, although endpoint plugins were deployed

* Follow the guidance in [How to configure endpoints for monitoring by ServicePulse](how-to-configure-endpoints-for-monitoring.md).
* Restart the endpoint after copying the endpoint plugin files into the endpoint's `bin` directory.
* Ensure [auditing](/nservicebus/operations/auditing.md) is enabled for the endpoint, and the audited messages are forwarded to the correct audit and error queues monitored by ServiceControl.
* Ensure relevant ServiceControl assemblies are not in the list of assemblies to exclude from scanning. For more details refer to [Assembly scanning](/nservicebus/hosting/assembly-scanning.md).
* Ensure the endpoint references NServiceBus version 4.0.0 or later.
* Follow the guidance in [How to configure endpoints for monitoring by ServicePulse](how-to-configure-endpoints-for-monitoring.md).
* Restart the endpoint after copying the endpoint plugin files into the endpoint's `bin` directory.
* Ensure [auditing](/nservicebus/operations/auditing.md) is enabled for the endpoint, and the audited messages are forwarded to the correct audit and error queues monitored by ServiceControl.
* Ensure relevant ServiceControl assemblies are not in the list of assemblies to exclude from scanning. For more details refer to [Assembly scanning](/nservicebus/hosting/assembly-scanning.md).
* Ensure the endpoint references NServiceBus version 4.0.0 or later.

### After enabling heartbeat plugins for NServiceBus version 3 endpoints, ServicePulse reports that endpoints are inactive

Messages that were forwarded to the audit queue by NServiceBus version 3.x endpoints did not have the `HostId` header available which uniquely identifies the endpoint. Adding the heartbeat plugin for these endpoints automatically enriches the headers with this `HostId` information using a [message mutator](/nservicebus/pipeline/message-mutators.md). Since the original message that was processed from the audit/error queue did not have this identifier, it is hard to correlate the messages received via the heartbeat that these belong to the same endpoint. Therefore there appears to be a discrepancy in the endpoints indicator.

To address this issue:

* Add the heartbeat plugin to all NServiceBus version 3 endpoints, which will add the required header with the host information.
* Restart ServiceControl to clear the endpoint counter.
* Add the heartbeat plugin to all NServiceBus version 3 endpoints, which will add the required header with the host information.
* Restart ServiceControl to clear the endpoint counter.
18 changes: 4 additions & 14 deletions transports/sql/native-publish-subscribe.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
title: SQL Server Native Publish Subscribe
summary: Describes the native publish subscribe implementation in the SQL Server transport
reviewed: 2022-03-18
reviewed: 2024-11-27
component: SqlTransport
versions: '[5,)'
versions: '[7,)'
---

The SQL Server transport implements the publish-subscribe pattern. In version 4 and below, this feature relies on message-driven pub-sub which requires a separate persistence for storage of subscription information. In version 5 and above, the transport handles subscription information natively and a separate persistence is not required.

The transport creates a dedicated subscription routing table, shared by all endpoints, which holds subscription information for each event type. When an endpoint subscribes to an event, an entry is created in the subscription routing table. When an endpoint publishes an event, the subscription routing table is queried to find all of the subscribing endpoints.

The SQL Server transport implements the publish-subscribe pattern and handles subscription information natively, so a separate persistence is not required. The transport creates a dedicated subscription routing table, shared by all endpoints, which holds subscription information for each event type. When an endpoint subscribes to an event, an entry is created in the subscription routing table. When an endpoint publishes an event, the subscription routing table is queried to find all of the subscribing endpoints.

## Configure subscription caching

Subscription information can be cached for a given period of time so that it does not have to be loaded every single time an event is being published. The longer the cache period is, the higher the chance that new subscribers miss some events.

The default behavior is to cache subscription information for 5 seconds. This value is comparable to the average time it takes a subscription message to reach the destination endpoint when using message-driven publish-subscribe (as in versions 4 and below). On the other hand the value is high enough to prevent excessive database lookups in high throughput scenarios when hundreds of messages are published each second.
The default behavior is to cache subscription information for 5 seconds. This value is comparable to the average time it takes a subscription message to reach the destination endpoint when using message-driven publish-subscribe. On the other hand, the value is high enough to prevent excessive database lookups in high throughput scenarios when hundreds of messages are published each second.

If the default value is not suitable for a particular endpoint it can be changed. To configure it, use following API:

Expand All @@ -25,7 +22,6 @@ In systems where events are subscribed and unsubscribed regularly (e.g. desktop

snippet: disable-subscription-cache


## Configure subscription table

A single subscription table is used by all endpoints. By default this table will be named `[SubscriptionRouting]` and be created in the default schema of the catalog specified in the connection string. To change where this table is created and how it is named, use the following API:
Expand All @@ -34,9 +30,3 @@ snippet: configure-subscription-table

> [!WARNING]
> All endpoints in the system must be configured to use the same subscription table. In a multi-schema or multi-catalog system the subscription table needs to be in a shared schema and catalog.
## Backwards compatibility

When upgrading to a version of the transport that supports native publish-subscribe, a compatibility mode must be enabled during the upgrade process. See the [dedicated upgrade guide](/transports/upgrades/sqlserver-4to5.md) for more information.


0 comments on commit bdf6362

Please sign in to comment.