I’m guessing your site wasn’t undergoing deliberate maintenance at the time of the error? In which case there must be something wrong with that proxy implementation/config. To rule it out, are you able to expose discourse directly on port 80/443? (according to our standard install instructions)
Of course, it’s possible that an error in Discourse is causing the proxy to display this message. But it’s difficult to diagnose that without knowing what Discourse was returning. Maybe your proxy keeps logs of the upstream Discourse responses?