Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:24:29+00:00 2026-06-17T04:24:29+00:00

I worked on Grails ( 2.1.0 ) project and after it’s completion found out

  • 0

I worked on Grails ( 2.1.0 ) project and after it’s completion found out that Tomcat runs out of memory. After not very sophisticated investigation I found that following lines of code causing memory leak:

def servletContext = ServletContextHolder.servletContext
def config = new ConfigSlurper().parse(servletContext.getResource('/WEB-INF/config.groovy').text)

Once I remove those 2 lines from my code execution, project runs on tomcat with stable memory usage. However if I bring those 2 lines back, memory usage slowly increasing.

I don’t understand why those 2 lines causing memory leak? What is so magical about them? How do I fix it? I need to access resources in the WEB-INF folder.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:24:30+00:00Added an answer on June 17, 2026 at 4:24 am

    You say in the comments that

    Code is in the Quartz schedule class. I am parsing it repeatedly once scheduled job executes.

    Every time you do ConfigSlurper.parse it has to compile a Groovy class. Since you are parsing a fixed script (from /WEB-INF/config.groovy) you will get the same result every time, so you should try and find some way to parse the file just once and store the resulting ConfigObject somewhere that your Quartz job can access it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I worked out a code that make sense to me but not python since
I worked on a project using eXistdb. XML Java API, etc. After that anytime
I worked with a graphic designer that did not clone from my github account.
I worked out an XSL template that rewrites all hyperlinks on an HTML page,
has anybody worked with a Grails application in production in Jetty and Tomcat and
I worked on a project that had the following requirement: TableA is the parent
I came across a situation that I had in another project that I'm not
I'm sort of new at Grails. I've worked with it a bit, but not
It worked just fine before I updated iOS4.3 After that, the delegate methods for
THE ANSWER THAT WORKED FOR ME BASED ON AN ANSWER GIVEN while($post = mysql_fetch_array($tags))

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.