it crashes on certain errors. Restart it automatically with sleep. May need to do migrate or db reset to do so. Be smart here?