I'm actually relying on PM2 restarts to help manage seemingly
limitless memory growth. Front end processes were driving us hard
into swap until the OOM killer would harvest Tomcat, then a couple of
minutes later Monit would start it again. The memory limit restart
seemed to be ineffective, so I added an hourly Cron restart that seems
to keep memory demand in check. It's rather crude, though. I think
it isn't waiting for any sort of "quiet point", as I originally
supposed it might.
I'd appreciate any experience with the interplay of the cache settings
and PM2 process memory limits.
Regardless of that, I think that dspace-angular needs some
graceful-shutdown code to close the HTTP listener neatly at the end of
a response. I'm looking into doing this with 'http-terminator'. It
should handle automatic restarts by PM2, manual restarts by the
sysadmin for whatever reason, and normal system shutdown.
--
Mark H. Wood
Lead Technology Analyst
University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu