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 6106839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:07:21+00:00 2026-05-23T14:07:21+00:00

I have met a Out of Memory problem in my application. In one of

  • 0

I have met a Out of Memory problem in my application.

In one of my threads execution, there is a sudden java.lang.OutofMemoryError and make that threads die.

I have already select the memory heap size for the application is 20M.
I have dumped out the memory usage for the whole application before and after this OOM on this thread occurs, it does not exceed 20M.

I don’t know how to tackle this problem.

So what is the possible causes of that java.lang.OutofMemoryError? and is there any method to tackle if I don’t know the exact reason?

This is what i got!
Before this memory usage of the application is 8M

after this memory usage of the application is also 8M.

  • 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-05-23T14:07:21+00:00Added an answer on May 23, 2026 at 2:07 pm

    The cause is that you run out of memory. This might however be one of several kinds so the exact message is important.

    You can attach to your running program with jvisualvm (in the JDK) and investigate the object tree to see where the memory went. Hopefully you can deduce why it is still used (can be as simple as a static field holding a copy of the structure) and how to get rid of it.

    When you found that, then put in try-finally clauses so that the memory is always released even if an OOM is thrown.

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

Sidebar

Related Questions

Good day! I have met problem with synchronizing threads. I am writing program which
I have been developing an user interface with Java Swing, and I have met
I met strange problem. I have never work with Devise gem before. So, i
Okay, so I understand all of us C/C++ programmers have at one time met
I am using C++ Builder XE3 and I have met a weird problem with
I have just created a java tic-tac-toe game i would like to figure out
I have a problem figuring out a small problem with this query to mysql
I am starting to learn Play Framework 2, and have met a strange problem.
I have problem I have never met before. I was clearing yesterday clients db
I have a requirement in my application that I think can be met by

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.