I had the 504 error off and on for at least 30 - 40 min. plus a couple of "SMF could not connect to the database ..." thrown into the mix.
Yep, that was me, sorry.
I have now narrowed it down.
I tried to perform an optimisation of the database table, an option provided from within SMF, and got a 504 error straight away.
But what cases the outage was that I when I tried a database backup (another option provided from within SMF) that immediately locked up the server with a 504 for at least 30 minutes. Something I have don many times in the past without issue.
So it's not the backup the server files that is the problem, it's a matter of the database.
gnif tells me that this is to be expected for a database of my size under cpanel/mysql, and the only solution is a MySQL slave on another server which is then backed up. Although I kinda find this hard to believe, as I've never had this issue before with either the former dedicated server box (32bit one, same host), cloud server, or shared server solutions. It seems to have only been since the move to the 64bit dedicated server that the issue has arisen. And the database hasn't gotten a huge amount larger since then, so that's what makes me think there could be something else at play here.
But then again I know jack about this stuff, just going on my experience.