Try obtaining heapdumps (with jmap) every few hours, or once per day over the course of a few hours or days, inspecting them with something like jvisualvm. You'll probably spot the cause of the problem more quickly than I replied to your message. OutOfMemoryErrors (OOMEs) on a web application are most likely either a memory leak (references to defunct objects being held longer than they should - easy to spot and inevitable OOME) or some code or library that occasionally demands a surprisingly large amount of memory (harder to spot and may only occur when several uses of the code or library occur concurrently). Try to obtain a heapdump from your webserver *after* the OOME and before you restart it. That isn't always possible, but you may see the smoking gun.