This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

heap size  RSS feed

 
Bernard Sigmund Gustav
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my application is throwing a java.lang.OutOfMemoryError and i would just like to know how to be able to tell how much your heap size is using the command line since it is on linux and how to increase the heap size?
java -Xms32m -Xmx256m does not work
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java itself provides some nice tools for montitoring memory usage.
I have a link that lists all of them on my workstation at the office.
I'll post it later today.

I've been playing with JConsole (ships with JDK1.5.0) lately. It's vey nice.
 
Bernard Sigmund Gustav
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ben.

Sorry for the late reply, I got sick.
Anyway, I am using Tomcat 4.1 deployed on Linux.
Since I was not able to find a solution that day, I just restarted the server.
But it might still recur in the future
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also using tomcat on linux, tomcat 5 on FC4. Although I do not know the nature of your application, I think 256 is a relatively small amount of memory.

I am able to increase the heap by changing the catalina opts var.

export CATALINA_OPTS=" -Xmx1664M -Djava.awt.headless=true ..."

Use the "top" command to check the memory in use. Press "Shift+M" to sort by memory. You can use top -p <pid> to monitor only the java process. Linux offers some other tools for process and system health monitoring.
[ November 07, 2006: Message edited by: Rashid Mayes ]
 
Bernard Sigmund Gustav
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. will try this if it works and will just update you.
thanks again
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!