If you’re suddenly getting “Bad Gateway” errors on your HHVM setup and it’s happened in the last week or so, it’s probably this problem.
In a nutshell, HHVM running in daemon mode seems to silently crash (leaving no error messages that I could find) after serving a few requests. On this server it would crash instantly if a fatal error was generated, but it seemed to serve several normal requests fine before finally dying.
Running under server mode it seems to work as normal.
Updated 2016-04-07 – as per the Github linked above this is now fixed in v3.13.1.