groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: Groovy Script Memory Management Anti-patterns
Date Mon, 21 Nov 2016 22:43:55 GMT
there is not really any useful information to make any properly based 
speculations in this post for me. In other words: to really say 
something I will need more detail

On 21.11.2016 21:52, Daniel Price wrote:
> Good afternoon, all.  I've a Groovy script with what might be a code
> caused memory leak, but I can't find the cause.  Basically, I'm using a
> script to take 2 GB chunks of data from a SQL Server DB, manipulate it,
> then insert it into a different SQL Server DB.  I've a few scripts that
> do this using Groovy SQL, and the others work well, but this one always
> ends in a Java heap OOME.  The difference, I think, is that this script
> is migrating a lot more data (TBs), so it runs much longer.
> I've done heap dump analysis, but I'm not ready to get into the details
> of that yet.  Seems the script might be holding onto every invocation of:
> List datalist = sourceDB.rows("${Sql.expand getDataQuery}")
> even though I've been careful to use static variables as well as
> dataList = null...
> I'm starting to think I'm missing something fundamental, rather than
> just a coding error.
> Any advice appreciated...
> D

View raw message