You know, I have been having this same issue, but only after shutting down and powering back on virtual webservers that are behind Cloudflare DNS. Typically a 500 error means it's server-side but I suspect something about using Cloudflare might be contributing. Whatever the cause, I've typically been able to resolve the error by restarting the webserver and waiting a few minutes.