Openfire crashing every few days after upgrading to ubuntu 16.04 (raspberry pi)

I decided to upgrade to Ubuntu 16.04 form 14.04 on my pi 2, after doing a fresh install of Ubuntu 16.04 LTS ‘classic’ openfire has started crashing every few days.

Looked through the logs and i did not see any error messages on why it crashed.

Setup-

raspberry pi 2

Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1052-raspi2 armv7l)

Java Version 1.8.0_121 Oracle Corporation Java HotSpot™ Server VM

ARM/RaspberryPi - Ubuntu Wiki

Just updated java - 1.8.0_131 Oracle Corporation – Java HotSpot™ Server VM

will see if it crashes again

Ok crashed again, however I think I found the issue, i was getting this error at the time when openfire stopped working

Out of memory: Kill process 14581 (mysqld) score 117 or sacrifice child

To fix this i am setting up swap on the pi, will see if it crashes again

Just an update, still getting the crashes.

Raspberry Pi 2

Ubuntu 16.04 LTS ‘classic’ for Raspberry Pi 2 https://wiki.ubuntu.com/ARM/RaspberryPi

Kernel Version 4.4.0-1057-raspi2 (SMP) armv7l

Java Version: 1.8.0_131 Oracle Corporation – Java HotSpot™ Server VM

I think I found a work around, disabling the oom killer (it will killing java for no reason).