FreePBX Distro Hangs

I am using FreePBX Distro Stable-3.211.63-8 in a virtual environment. Everything works great except the OS crashes randomly every few days, sometimes even few times a day. The only way to revive is to do a hard reboot as the OS becomes inaccessible completely.

Here is what the server shows when it hangs:

I was able to fix it (so I thought) by running the following command at boot:
echo 0 > /proc/sys/kernel/hung_task_timeout_secs

Since I added that command to crontab to run at boot, the server hasn’t crashed for over a week until today when it did it again.

I really need to find a permanent fix for this issue. Please provide your valuable inputs

I think you will find that your problems are kernel/hardware related, badly designed virtualizations will often behave like this.