I am getting that error a lot recently. I hope it's something Theymos can fix by throwing more resources at it!
I just really hope theymos starts rolling out the new forum software some time soon, considering that there's already a public beta / demo of it. It's getting annoying trying to moderate with all these 504s and "Database Error"s popping up way more often than they should. And don't even get me started on the number of people that started dozens of identical threads because they thought their previous attempts didn't come through.