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,

Two reasons come to mind:
- A rogue implementation which manifests itself as the number of documents to be transferred increases. Profile the application thoroughly looking for memory leaks and unintentional object retention.
- The default heap size doesn't suit well for your current processing needs. Tune your JVM by setting an appropriate heap size and garbage collection strategy to suit your needs.

Read this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.