Componentix blog – Run long batch processing jobs in Grails without memory leaks

In one of our Grails applications we had to run a number of batch jobs. Nothing unusual and Grails supports it quite well with the excellent Quartz plugin.

But when we deployed application in production, we noticed that after running for some time, it consumed a lot of memory and JVM was spending all the time running garbage collection. The reason for it was that our jobs were quite long-running, taking several hours to complete, and Grails wasn’t really designed for such kind of use case.

But “not designed for” doesn’t mean it’s not possible, of course. Great info about how to clear out some of the things that will eat up memory over time in long-running Grails processes.

Leave a Reply

Your email address will not be published. Required fields are marked *