Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about OutOfMemoryError  RSS feed

 
Huaying Feng
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!All,
I developed some program on AdventNet which includes Apache and Tomcat3.3. I use JDK1.3.1.
Now, after several days, my program will be dying. I checked the logs of Tomcat. It shows "java.lang.OutOfMemoryError
<<no stack trace available>>".
I know that "java -Xmx128m" can resolve some problem. But, if the Memeory leak occurs, it's no use at all.
I ever used OpitmizeIT (from Borland) to test the performace. But, I think it hard to find the problem. Maybe, I have not known how to use the tool effectively.
Could you help me? Thanks a lot!
[ November 04, 2003: Message edited by: Huaying Feng ]
 
Joe Ess
Bartender
Posts: 9428
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Memory leaks are caused by allocating resources and not properly freeing them. The most common leak is opening a database connection and not calling close() on it. You must explicitly close ResultSet, Statement, and Connection instances in a finally block so they will be freed whether an exception occurs or not.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!