What is probably happening is that one of your process itself is stopping and this could be due to either an error or out of memory.
We'd recommend that you install tmux and then you will be able to attach back to the tmux session and see the output if/when the same problem occurs again to help you identify the specific cause and make the necessary adjustments/changes
If you are new to tmux, check out this page: Tmux (there are many other sites as well if you search around)