Results 1 to 3 of 3
  1. #1
    new_2_java is offline Member
    Join Date
    Feb 2008
    Posts
    60
    Rep Power
    0

    Default java.lang.OutOfMemoryError

    Hi all,

    I have a threaded program, which migrates contetn from one repository to another. The program works fine, when I test for small number of documents, say arround 10 or 20. But when I increase the number of documents, then I get java.lang.OutOfMemoryError. I can't seem to figure out how to fix this.

    I presume it is the JVM which runs out of memory. Can someone please shed some lights arround this. Now, I am not sure if it's my code, or its JVM setting.

    Please advise...


    Thanks,

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,563
    Rep Power
    25

    Default

    Are you keeping any copies of the data around that could be released?
    What is your code doing to use memory?
    Have you tried using the System methods that show memory usage to see when the problem occurs?

    There are java command options to increase the amount of memory to the jvm. They begin with -X

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by new_2_java View Post
    Hi all,

    I have a threaded program, which migrates contetn from one repository to another. The program works fine, when I test for small number of documents, say arround 10 or 20. But when I increase the number of documents, then I get java.lang.OutOfMemoryError. I can't seem to figure out how to fix this.

    I presume it is the JVM which runs out of memory. Can someone please shed some lights arround this. Now, I am not sure if it's my code, or its JVM setting.

    Please advise...


    Thanks,
    That means you use the memory for your application but not release/free it. What are you doing with the memory. Seems to me you are working with files. How did you do that? Where you keep all read information from files? That can be the issue.

Similar Threads

  1. java.lang.OutOfMemoryError: Java heap space
    By paul in forum Advanced Java
    Replies: 11
    Last Post: 06-12-2010, 05:30 PM
  2. java.lang.OutOfMemoryError
    By vidhya.sk in forum New To Java
    Replies: 2
    Last Post: 09-18-2008, 12:21 PM
  3. Replies: 11
    Last Post: 09-01-2008, 10:56 AM
  4. java.lang.OutOfMemoryError in a web service client
    By elchape in forum Advanced Java
    Replies: 4
    Last Post: 06-28-2008, 05:21 PM
  5. java.lang.OutOfMemoryError with java vector
    By mary in forum New To Java
    Replies: 3
    Last Post: 08-03-2007, 10:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •