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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:57:59+00:00 2026-06-05T09:57:59+00:00

In my Tomcat application I am eventually getting Out of memory and Cannot allocate

  • 0

In my Tomcat application I am eventually getting “Out of memory” and “Cannot allocate memory” errors. I suppose it is nothing to do with the heap as it completely fulls up the system memory and I am hardly able to run bash commands.

How this problem is connected to the heap? How can I correctly set up heap size so that the application has enough memory and so it does not consume too much of the system resources?

Strange thing is that “top” command keeps saying that tomcat consumes only 20% of mem and there is still free memory, once the problem happens.

Thanks.

EDIT:

Follow-up:
BufferedImage leaks – are there any alternatives?

  • 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-05T09:58:03+00:00Added an answer on June 5, 2026 at 9:58 am

    Problems with running bash scripts may indicate I/O issues, and this might be the case if your JVM is doing Full GCs all the time (which is the case, if your heap is almost-full).

    The first thing to do, is to increase the heap with -Xmx. This may solve the problem, or – if you have a memory leak, it won’t, and you will eventually get OutOfMemoryError again.

    In this case, you need to analyze memory dumps. See my answer in this thread for some instructions.

    Also, it might be useful to enable Garbage Collection Logs (using -Xloggc:/path/to/log.file -XX:+PrintGCDetails) and then analyzing them with GCViewer or HPJmeter.

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

Sidebar

Related Questions

I have a Tomcat Application Server that is configured to create a memory dump
Is there an application or something out there that will track a Tomcat application's
We have Tomcat application server set up at port 8080 and Apache Http Server
I am connecting to two tomcat application via the ajp protocol. both of which
Background: I have a Spring 2.5/Java/Tomcat application. There is the following bean, which is
I have to to deploy a Ruby on Rails application to an tomcat application
I am writing a web application (Tomcat 7) so no JTA and want to
I need to release some resources in my web application (Tomcat 7). I try
When I run my application on tomcat the spring-context.xml file is located at /WEB-inf/spring-context.xml
I am currently building an application using Tomcat, Spring and JAVA. I am using

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.