We have seen in several instances where we are unable to restart HornetQ after reaching certain memory thresholds.
Scenario 1) HornetQ has crashed due to running out of memory either due to misconfiguration of the paging parameter(s) or unexpected resource consumption as a combination of all the processes running on the machine.
Scenario 2) We have reached a point where we have entered paging, and there are a large number of paging files (40+) meaning we have been paging for a while, typically do to one of our durable subscribers not being available to consume messages.
In both cases, is now in a stopped state, and we attempt to start it back up again. HornetQ never manages to start up, it either completely hangs, or throws an out of memory error. In both instances, the only way to get HornetQ to restart was to bump up the -Mmx parameter in the start script to significantly higher than it was (roughly 50% higher) in order to get HornetQ to start back up again. (or clean out the journal and paging directories, which would not be an option for a system in production).
Our typical configuration starts HornetQ with an -Xmx1024m and a paging configuration as follows: