I've been doing some benchmarking with latest version of each server. My tests show nginx clearly being faster for static files. Though I've noticed that with default settings for php-fpm Apache with mod_php is actually faster than either server with php-fpm. But after a few minor tweaks to that pool php-fpm is performing same or better at times than mod_php. Nginx and Apache for small concurrencies perform about the same.
The problem I can't figure out though is that once I test higher concurrencies (200+) Nginx starts spitting out a lot of 500 errors. Whereas on my same machine Apache using php-fpm has 100% availability (despite Nginx being below 20% availability). It's continues like that with much higher concurrencies too. Apache performs just fine without issue or much performance hit at concurrencies of 700 or so connections. Whereas Nginx can't handle more than 150 without massive failures.
Am I missing something here? A setting that results in failures to proxy requests to php-fpm less efficiency in Nginx than in Apache?