以下是我的情況:我儘可能詳細地包含了我能想到的內容,但請告訴我您是否需要其他信息。我在網上搜索了一個小時左右,沒有找到任何可以解決我的具體問題的帖子,所以任何幫助(甚至鏈接),將不勝感激。SSIS數據流任務:內存不足異常
我正在寫數據流任務以在我的數據源上執行SCD操作(使用Task Factory's SCD Component)。我通過一個非常緩慢的連接從一個網絡中的Oracle源加載到我的新服務器上的SQL源中。
SCD操作需要我從源和目標中提取數據,並比較兩者。但是,兩個連接的相對速度對我造成了一些問題:SQL源的速度快了將近10倍,因此在舊服務器傳輸1時,數據流將從新服務器中抽取800萬條記錄百萬。
由於兩個數據源彙集在一起並流經相同的SCD組件,到達8m/1m標記時,仍有7m行等待SQL源。據我瞭解,這7米行正在內存中等待通過SCD進行處理。
我收到SSIS調試主機停止工作並且系統無法再向緩衝區寫入更多新行的錯誤消息。這些消息在不同的組件和步驟上(我有大約30張表格,情況相同),所以我相當確信這是可用內存的一般問題,而不是包裝中代碼的特定問題。另外,如果我運行單獨的表或者甚至是一組表,那麼這個包總是會成功的 - 它只會在嘗試並行加載某些表時失敗。迄今所採取
步驟:
1)拆分表被加載到多個順序容器/子包,以緩解內存壓力:這主要是工作,但減緩了整體執行下來一個很長的時間。另外,當達到某個限制時,某些表仍然會拋出SSIS調試主機錯誤(如下)。
2)添加腳本組件來計算源上的散列值(如在this post中),然後我可以使用它來確定記錄是否已更改,而不是比較每列。這也意味着我不需要從目標表中提取所有列,我認爲這會幫助解決內存不足的問題。
問題是繼續:
我還得到一個崩潰一次行計數失衡達到極端水平,即使只有拉幾個(6日期時間,3 INT,2數字(38,0))列來源和目的地。這發生在沒有上面提到的Hash值的表上。數據流在故障點的屏幕截圖如下:注意行數。
思考下一步做什麼: 我不知道是否有一種方法,以便它拉記錄以相同的速度與其他的SQL源放慢?任何想法如何實現這一點?
完整的錯誤描述: 1)SSIS調試主機已停止工作(彈出窗口)。
Problem signature:
Problem Event Name: APPCRASH
Application Name: DtsDebugHost.exe
Application Version: 2011.110.2100.60
Application Timestamp: 4f35e2b2
Fault Module Name: clr.dll
Fault Module Version: 4.0.30319.18449
Fault Module Timestamp: 528fdc93
Exception Code: c0000005
Exception Offset: 0010d0aa
OS Version: 6.2.9200.2.0.0.272.7
Locale ID: 1033
Additional Information 1: 9336
Additional Information 2: 9336482019c99e3f312ddc2ccd6c9a04
Additional Information 3: b33b
Additional Information 4: b33bc67c4e950cb436b9dbebdd26abc8
2)SSIS錯誤消息:
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Exception adding key to cache) in ProcessInput sending row to cache.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Exception adding key to cache) in ProcessInput adding rows to the cache.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Exception adding key to cache) in ProcessInput.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Unexpected exception in OrderedHashList.Remove removing entry from internal structures: Exception of type 'System.OutOfMemoryException' was thrown.) in ProcessKey thread dequeueing a key (03720200).
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Unexpected exception in OrderedHashList.Remove removing entry from internal structures: Exception of type 'System.OutOfMemoryException' was thrown.) in ProcessKey thread dequeueing a key (28740100).
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Internal error (Unexpected exception in OrderedHashList.Remove removing entry from internal structures: Exception of type 'System.OutOfMemoryException' was thrown.) in ProcessKey thread dequeueing a key (03720200).) in ProcessCache_Thread_ProcessKey.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Internal exceptions encountered.) in ProcessInput.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Internal error (Unexpected exception in OrderedHashList.Remove removing entry from internal structures: Exception of type 'System.OutOfMemoryException' was thrown.) in ProcessKey thread dequeueing a key (28740100).) in ProcessCache_Thread_ProcessKey.
[TF Dimension Merge Slowly Changing Dimension] Error: Internal error (Internal exceptions encountered.) in ProcessInput.
系統細節:
Windows Server 2012中
安裝的內存(RAM):64.0 GB
系統類型:64位操作系統,基於x64處理器
SSIS 2012 從Visual Studio環境中執行的(問題也作爲計劃的作業通過SQL Server代理運行時,會出現
你可以彈出你的數據流的截圖嗎? – billinkc
按要求添加@billinkc。您可以看到的行數顯示出現OutOfMemory異常的程序包失敗點。 – AHiggins
我不熟悉PW的組件,但是可以通過消除那裏的數據轉換組件來減少你的包的內存佔用量。我猜這是爲了讓Oracle數據類型與SQL Server的數據類型保持一致?如果是這樣,是否可以顯式轉換爲Oracle源中的目標數據類型? – billinkc