Neo4J server crashing

We are experiencing Neo4j crashing unexpectedly from time to time, sometimes in the middle of the night with nobody using it. I've looked at the logs and can't see anything. It just looks like the process has died without logging anything.

I'm running Neo4j V5.2 enterprise on an AWS EC2. We are running dev instances on small size EC2s (tiny size). This works great most of the time even with the small size EC2. It's set up using the AWS stack provided for deploying Neo4j to AWS so I believe the setup is correct.

This is a development instance (hence the small size) and we are developing on it so we do sometimes run queries which are large or run out of memory. Maybe that's the clue, the Neo4j server instance is just running out of memory. However I thought when the query terminates the memory should be recovered and Neo would protect itself against queries which would bring down the whole database(s).

Has anybody experienced anything similar?
Is there any way to find out why the service just dies?
Is there anything out there which will automatically start the process again if it dies?

Thank you everybody.

@RichardBonnett

do you have a linux oom killer in place which indescriminately detects when u at near all RAM exhaustion and simply starts to kill proccesses

check /var/log/messages at the time of Neo4j coming down

@dana_canzano Thanks for the reply. I don't believe the OOM is running, I've checked in /var/log/messages and nothing in there indicates OOM is killing it. In fact there's no mention of neo at all in messages.
cat /proc/sys/vm/panic_on_oom returns 0 indicating (I believe) oom is disabled.