Consider installing the MariaDB addon. I’ve had no db issues since switching to this.
It will use more memory resources but is a lot faster and more stable.