[英]SignalR SQL Server Broker - Orphaned Service Broker Queue Errors
I am using SQL Server Broker on SQL Server 2008 for Scaleout with SignalR v2.1.2. 我正在使用SignalR v2.1.2在SQL Server 2008上使用SQL Server Broker进行横向扩展。 It was recently discovered that we are producing 50k+ errors per day in our DB logs.
最近发现,我们每天在数据库日志中产生5万多个错误。 After some research, there are 3 orphaned Service Broker queues from December.
经过一些研究,从12月开始有3个孤立的Service Broker队列。 Error example:
错误示例:
2016-02-27 23:58:01.79 spid30s The activated proc '[dbo].[SqlQueryNotificationStoredProcedure-2ffbddba-6ddc-4ad0-88b4-45a405e975e0]' running on queue 'MY_SIGNALR_DB.dbo.SqlQueryNotificationService-2ffbddba-6ddc-4ad0-88b4-45a405e975e0' output the following: 'Could not find stored procedure 'dbo.SqlQueryNotificationStoredProcedure-2ffbddba-6ddc-4ad0-88b4-45a405e975e0'.' 2016-02-27 23:58:01.79 spid30s已激活的进程'[dbo]。[SqlQueryNotificationStoredProcedure-2ffbddba-6ddc-4ad0-88b4-45a405e975e0]'在队列'MY_SIGNALR_DB.dbo.SqlQueryNotificationService-2ffbddba-6ddc-4ad0-88b4上运行-45a405e975e0'输出以下内容:'找不到存储过程'dbo.SqlQueryNotificationStoredProcedure-2ffbddba-6ddc-4ad0-88b4-45a405e975e0'。
These queues were created in December and were NOT dropped for some reason. 这些队列是在12月创建的,由于某些原因没有被删除。 The corresponding SPs were apparently dropped as expected.
显然,相应的SP下降了。 The DB will produce an error every 5 seconds for this (equates to 50k per day with 3 queues).
DB将为此每5秒产生一次错误(相当于每天3万个队列,每天50k)。 Each queue DOES contain a message.
每个队列都包含一条消息。
Questions: 问题:
What can cause this? 是什么原因造成的?
Are there additional SignalR settings that can be implemented to ensure these are cleaned up? 是否可以实施其他SignalR设置以确保将其清除?
Is this a bug in SQL Server Service Broker? 这是SQL Server Service Broker中的错误吗?
Is there a document which describes SignalR's expected behavior with regards to Queues and their expiration? 是否有文档描述SignalR关于队列及其到期的预期行为?
Thank you for your time. 感谢您的时间。
These are leftover from SqlDependency
. 这些是
SqlDependency
遗留物。 The implementation of the SqlDependency.Start()
is to create a just-in-time service, queue and activated procedure (see the reference source ). SqlDependency.Start()
的实现是创建即时服务,队列和激活过程(请参阅参考资料 )。 This has some issues , and even a simple Visual Studio debugging session can leave stranded queues/activated procedures. 这有一些问题 ,甚至简单的Visual Studio 调试会话也可能会留下搁浅的队列/激活的过程。
You can clean up these left-over service/queue/procedures as they happen, or you can choose to use the lower level SqlNotificationRequest
class and handle the service/queue deployment on your own. 您可以在发生这些剩余服务/队列/过程时对其进行清理,或者可以选择使用较低级别的
SqlNotificationRequest
类,并SqlNotificationRequest
处理服务/队列部署。 Pick your poison. 选择你的毒药。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.