Cra*_*lor 3 sitecore sitecore6 sitecore-media-library
Sitecore 6.6
我也正在与Sitecore支持人员讨论这个问题,但我想我也会联系社区.
我们有一个自定义代理,可以将文件系统上的媒体与媒体库同步.这是一个新代理,我们犯了不监控数据库大小的错误.它应该导入大约8 GB的数据,但数据库在很短的时间内膨胀到713 GB.事实证明,"master"和"web"数据库中的"Blobs"表几乎占据了所有这些空间.
我尝试使用"控制面板"中的"清理数据库"工具.我只选择了一个数据库.由于消耗了SQL Server上所有可用的锁,它在被轰炸前运行了6个小时:
Exception: System.Data.SqlClient.SqlException
Message: The instance of the SQL Server Database Engine cannot obtain a LOCK
resource at this time. Rerun your statement when there are fewer active users.
Ask the database administrator to check the lock and memory configuration for
this instance, or to check for long-running transactions.
Run Code Online (Sandbox Code Playgroud)
然后它将所有东西都卷回来 注意:我将SQL和DataProvider超时增加到无穷大.
其他人处理这样的事情?如果我能够以较小的块"清理"数据库以避免压倒SQL Server,那将是一件好事.
谢谢!
谢谢你们的回应.
我还提到了支持,他们能够提供一个清理Blobs表的SQL脚本:
DECLARE @UsableBlobs table(
ID uniqueidentifier
);
INSERT INTO
@UsableBlobs
select convert(uniqueidentifier,[Value]) as EmpID from [Fields]
where [Value] != ''
and (FieldId='{40E50ED9-BA07-4702-992E-A912738D32DC}' or FieldId='{DBBE7D99-1388-4357-BB34-AD71EDF18ED3}')
delete top (1000) from [Blobs]
where [BlobId] not in (select * from @UsableBlobs)
Run Code Online (Sandbox Code Playgroud)
我对脚本所做的唯一更改是添加"top(1000)",以便在较小的块中删除它.我最终将这个数字增加到200,000,一次运行大约一个小时.
关于原因,我们还不太确定.我们认为我们的自定义代理程序运行得太频繁,导致插入程序堆叠在一起.
另请注意,Sitecore更新显然解决了Blobs表失控的问题.更新是6.6,更新3.
| 归档时间: |
|
| 查看次数: |
1098 次 |
| 最近记录: |