• Post Reply Bookmark Topic Watch Topic
  • New Topic

OutOfMemoryError

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
One of the people using a jsp application I've created is getting a OutOfMemoryError on their AIX machine. I can't replicate it on our Windows machine BUT, here's the thing. Thye have only recently starting getting this error. It appears to happen randomly across different pages of the application ruling out possible infinite loops and such. I'm using RedBack as the servlet container if that helps. I'm not too familar with how the JVM heap works and etc.., but, going by the information stated here, can anyone offer some suggestions on how to fix this and some explanation why I should do it? Once a browser window is closed does the session objects contents get garbage collected? Thanks so much for any help.

Rob
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once a browser window is closed does the session objects contents get garbage collected?

Once a session is invalidated, all of the references it contains are released - whether or not the objects are GCed depends on if there are any other references. Sessions get invalidated by:
1. Your program specifically calling invalidate()
- or -
2. The servlet container timing out the session and calling invalidate.

Possibly the AIX machine is just getting more traffic or does not have enough memory assigned to the servlet container. The command line parameters to assign memory to a JVM are covered in the tooldocs section of the Java docs.
Bill
 
abhishek gowlikar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Out of Memory Error will occur because of using some for loops,while loops where it almost reaches to Infinite.

Check the conditions
 
Shrinivas Mujumdar
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set ms & mx options while server startup in startup.bat or similar file as a java option

java -X ms 512Mb mx 512Mb or something similar

Shriniwas
 
Ram Gokul
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Pike ,
we had the same problem but the other way around . We got in all our MS servers and not in other machines .The reason was due to some patch MS provided for some other issue .

since the systems are same , ask you client whether they have applied any patch recently .
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Pike:
I'm using RedBack as the servlet container


Are you using "RedBack" or Websphere/Tomcat/Resin/etc as your servlet container?

As I understood it, RedBack was simply a web object used to access certain databases (IBM brand, if I recall correctly).
 
Chris Boldon
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've also had that problem with applications that accept file uploads, not sure if this is your case. But if it is it helps to make sure you clear the session and specify max file sizes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!