We’ve just released NServiceBus.Persistence.Sql 6.2.1.
#747 Outbox table keeps growing indefinitely on endpoints with large throughput
You might be affected if the outbox feature is enabled and configured in the pessimistic mode and the endpoint’s throughput is around 50 messages per second.
The outbox table continues growing despite the constant number of rows.
The growth is caused by SQL Server being unable to find space for newly inserted data. When in pessimistic mode, the outbox records are created in two steps: First, a relatively small row (~50 B) gets inserted which is later updated with the outgoing message data, making the row significantly bigger.
Every time a row is updated to store additional data, more space is required to store the row. If there isn’t sufficient free space available on the data page to store the row it needs to be moved to another page. For large tables, the algorithm for finding free space might decide to allocate a new page, even if a suitable one already exists. This happens relatively infrequently. However, over longer periods of time, this results in an accumulation of empty, unused pages and thus a steady growth of the table size.
You should upgrade during the next maintenance window.
You can install the new version from NuGet.
The team in Particular
Please read our release policy for more details.