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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:02:59+00:00 2026-06-04T14:02:59+00:00

I want to run several REST web applications inside one Java process to save

  • 0

I want to run several REST web applications inside one Java process to save memory and scale easily with help of Akka. I would like to estimate how much memory each request handler consume and detect these dangerous for the entire system.

  1. Is it possible to monitor memory usage in almost real time inside that process and find out how much memory is used be each request handler? What I need to achieve that? Are there any tools?

  2. Is it possible to catch out of memory exception and based on memory usage do something, for example crash only request handlers exceeding assumed memory limit? If so, what could be bad with that?

  • 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-04T14:03:04+00:00Added an answer on June 4, 2026 at 2:03 pm

    To answer your first question, there are many tools which you can use to monitor memory usage, however i don’t know of any application which maps memory usage to threads in “real” time. Within the application you can use the MemoryMXBean and MemoryPoolMXBeans to monitor memory usage,

    To answer your second question: no, not really. Besides the fact that it is generally a bad idea to catch OOME, the primary problem is that the thread which receives the exception may not be the actual culprit. the OOME is thrown on the thread which makes the final allocation request. however, some other thread could be the one which filled up most of memory. The other problem is that since OOME can be thrown at any time, it could be thrown inside some critical code within your application, leaving it in a crippled state. long story short, you pretty much always want to restart your application when you receive an OOME.

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

Sidebar

Related Questions

I want to run several threads inside a process. I'm looking for the most
I want to run a process in bash and save in an env variable
I want to to run several shaders one after the other (mostly image processing),
i want to run some command on several machine using ssh. I know it
I want to design a protocol between several components I have. each can run
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I want to run an article site on several languages, I already translated translation
I have an application which needs to run several other applications in chain. I
I am working on a .NET Web Service and I want to run multiple
I've got several queries I want to run on a single page. I obviously

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.