I'm iterating the cursor and outputting to the view. I'll try a
On Apr 12, 11:33 am, Keith Branton <
ke...@branton.co.uk> wrote:
> I've never used YourKit, but your stats would tend to suggest that you don't
> have a memory leak at least.
>
> It sounds like you are not letting go of the references quickly enough for
> them to be discarded before they get tenured.
>
> Are you adding results of your $in query into a list or something rather
> than just iterating the cursor?
>
> If rearranging code can't help then then increasing your overall heap size
> may help (as that will increase eden size, reducing the frequency of eden
> GCs and so help keep these objects from being tenured)
>
> I don't tend to use heaps bigger than 2GB with production Java web servers
> (Your 1.5GB heaps seem reasonable), though I have used heaps as big as 20GB
> on one very high traffic web site with decent results. (I would normally
> favor load balancing several 2GB jvms on a box in preference to a single
> large one)
>
> There are many GC options you can experiment with that can affect GC pauses
> in tenured, but the first step is to stop request-scoped objects from
> getting tenured as much as possible.
>