chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control

Home Page:http://projectroundhouse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roundhouse Out of Memory error when determining whether a script has run before

vcdevopslabs opened this issue · comments

Roundhouse is breaking (out of memory error) on roundhouse’s ability to determine whether a script has run before when large scripts are in the text_of_script field of the ScriptsRun table. The text_of_script field of the ScriptsRun table has scripts that were several MB is size.
In the error shown below, there were no scripts in alterDatabase, so it moved on to runBeforeUp and found scripts. It then tried to check against records in ScriptsRun and got the Out of Memory error. After those large scripts were deployed to the next environment, that instance also started having OOM errors.

Why is the text_of_script field needed in the query of existing data? Isn't the only thing needed the text_hash field? Can the query be modfied to not include text_of_script field?

Thank you!

Looking for AlterDatabase scripts in "D:\mydatabasescripts\alterDatabase". -------------------------------------------------- -------------------------------------------------- Looking for Run Before Update scripts in "D:\mydatabasescripts\runBeforeUp". -------------------------------------------------- Exception of type 'System.OutOfMemoryException' was thrown. Exception of type 'System.OutOfMemoryException' was thrown. 01_base32CrockfordEnc.sql - I didn't find this script executed before. NHibernate.Exceptions.GenericADOException: could not execute query [ SELECT this_.id as id1_1_0_, this_.version_id as version2_1_0_, this_.script_name as script3_1_0_, this_.text_of_script as text4_1_0_, this_.text_hash as text5_1_0_, this_.one_time_script as one6_1_0_, this_.entry_date as entry7_1_0_, this_.modified_date as modified8_1_0_, this_.entered_by as entered9_1_0_ FROM RoundhousE.ScriptsRun this_ ] [SQL: SELECT this_.id as id1_1_0_, this_.version_id as version2_1_0_, this_.script_name as script3_1_0_, this_.text_of_script as text4_1_0_, this_.text_hash as text5_1_0_, this_.one_time_script as one6_1_0_, this_.entry_date as entry7_1_0_, this_.modified_date as modified8_1_0_, this_.entered_by as entered9_1_0_ FROM RoundhousE.ScriptsRun this_] ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.