我正在使用NServiceBus 5.2.16,我遇到了审计日志清理问题。在ServiceControl管理实用程序中,审核保留期限设置为30天。但是,RavenDB数据库每天都在不断增长,并且在ServiceInsight中,我可以看到超过30天的成功消息,因此我怀疑旧消息不会从数据库中删除。我能做些什么来限制NServiceBus RavenDB数据库的大小?NServiceBus审计清理不起作用
1
A
回答
1
我设法通过删除整个Raven数据库并重新启动ServiceControl来解决此问题。这创建了一个新的数据库,之后,旧的审计条目被ServiceControl正确删除。
我确实从特定的支持获得了一些有用的信息。您可以通过ServiceControl.exe.config
文件中的设置来控制审计清理过程。特别是,ServiceControl/ExpirationProcessTimerInSeconds
和ServiceControl/ExpirationProcessBatchSize
设置很有用,因为它们允许您更频繁地安排清理过程或增加每批中删除的项目的最大数量。您可以在NServiceBus documentation中找到有关这些设置的更多详细信息。
此外,您可以监视ServiceControl的日志文件中的清理过程。但是,首先您需要将日志记录详细程度提高到至少Info
。这可以使用ServiceControl.exe.config
文件中的ServiceControl/LogLevel
设置完成。更改日志级别后,您应该在ServiceControl的Logs
目录中的文件中看到类似于下面的日志条目。
2016-10-26 09:49:06.2652|77|Info|ServiceControl.Infrastructure.RavenDB.Expiration.SagaHistoryCleaner|Batching deletion of 0-499 sagahistory documents completed.
2016-10-26 09:49:06.2808|77|Info|ServiceControl.Infrastructure.RavenDB.Expiration.SagaHistoryCleaner|Batching deletion of 500-715 sagahistory documents.
2016-10-26 09:49:06.4996|77|Info|ServiceControl.Infrastructure.RavenDB.Expiration.SagaHistoryCleaner|Batching deletion of 500-715 sagahistory documents completed.
2016-10-26 09:49:06.4996|77|Info|ServiceControl.Infrastructure.RavenDB.Expiration.SagaHistoryCleaner|Deleted 716 expired sagahistory documents. Batch execution took 11635ms
2016-10-26 09:49:06.4996|77|Info|ServiceControl.Infrastructure.RavenDB.Expiration.ErrorMessageCleaner|No expired error documents found
相关问题
- 1. Mongo TTL清理不起作用
- 2. 使用NServiceBus时清理文件FileShareDataBus
- 3. 弹簧数据JPA审计不起作用
- 4. 清除[rootParams]不起作用
- 5. 我如何指示JAXB Marshaller仅为审计清理base64Binary数据?
- 6. C#代码清理/审计工具(独立于IDE之外)
- 7. Javascript计算器简单清除功能不起作用
- 8. NHibernate的审计 - PostInsert不工作
- 9. 清理网址.htaccess文件不起作用
- 10. 测试之间的轨道清理数据库不起作用
- 11. SQL计数不起作用
- 12. 计数器不起作用
- 13. XSLT计数()不起作用
- 14. jQuery计算不起作用
- 15. 设计destroy_user_session不起作用
- 16. 设计skip_confirmation!不起作用
- 17. 画布 - 清除矩形不起作用
- 18. 清除:divs => 1050px不起作用
- 19. Android清单许可不起作用
- 20. largeHeap = true清单标签不起作用?
- 21. 清单模型不起作用
- 22. 清单在VS2015中不起作用
- 23. css - 清除浮动不起作用
- 24. 清除缓存不起作用
- 25. Zookeeper自动清除不起作用
- 26. 强化审计工作台
- 27. Oracle SYS.AUD $审计操作
- 28. 审计撤销操作
- 29. SpriteKit物理不起作用
- 30. 纹理不起作用
但是,您是否可以尝试更新ServiceControl并将其更新到最新版本? http://particular.net/downloads –
我已经在使用最新版本(1.23)。我就此问题联系了特别支持。一旦我从他们那里获得任何信息,我会发布更新。 –
我也注意到使用最新版本的这个问题。 – Kye