I'm currently testing Symfony2 with Nginx and PHP-FPM. I also use Xdebug.
Symfony2 comes with a Demo bundle, I wanted to test the new handling of fatal errors which comes with Symfony 2.2.0 by creating a syntax error in the Acme/Demo bundle. Why I do that, the server response is 502 bad gateway.
But if I make a syntax error in the file app_dev.php (so before the framework is fired), then Xdebug tells me about the fatal error.
And surprisingly, if I fix that typo, then re-create the syntax error in the Acme/Demo bundle, then Symfony error handler appears as expected. And finally if a fix all typos (page works) then again re-create that same typo (again in Acme/Bundle), I get a bad gateway.
Do you have any clue on this?