• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

configuring JVM parameters

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
After running my java application for around 10-12 hours i am getting the following error and finally the server stops.
Error: "java.lang.OutOfMemoryError: unable to create new native thread"
System configuration:
1. Java : j2sdk1.4.2_08
2. System configruation: Windows XP service pack 3, (2x3.0Ghz with 4 GB RAM)
3. I run my application as Java Services and the java services has the "-Xmx512m", no other JVM args settings.

Can somebody help me in knowing the cause of the problem and suggest me the best solution.

Regards,
Satya
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can run the JVM with -verbose:gc and -XX:+PrintGCDetails to see more details about memory usage an memory freeing. Of course you can increase Xmx and Xms but maybe you have some kind of memory leak on your application.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your application creates lots of Threads, perhaps you are not allowing the JVM to dispose of them correctly by exiting the run method.

This happened to me once - I was creating Threads but not starting them properly.

Bill
 
reply
    Bookmark Topic Watch Topic
  • New Topic