Michael Ossareh <ossa...@gmail.com> writes:

> There areĀ 54874 companies in the companies var. The OOM tends to take place 
> when there are 1000 or so companies to process.
>
> What is likely to be causing this issue?

I replied on IRC but just recapping here.

I think you've probably been bitten by the way Java strings share data.
The gotcha is described here better than I can:

http://fishbowl.pastiche.org/2005/04/27/the_string_memory_gotcha/

One thing you can do to try to debug this sort of thing is to add
-XX:+HeapDumpOnOutOfMemoryError to the JVM command-line.  Then when you
run into an OOM this will happen:

    java.lang.OutOfMemoryError: GC overhead limit exceeded
    Dumping heap to java_pid8706.hprof ...
    Heap dump file created [14429104 bytes in 0.154 secs]

You can then load that .hprof file into jvisualvm (shipped with the JDK)
to show what objects are using up the heap.  It'll let you drill right
down and even inspect individual objects.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to