I configured nginx such that it could handle 500k requests/s no sweat. That was benchmarking static html with wrk.
Then, I connected nginx with php-fpm 7.1 via fastcgi_pass to bench the server's performance. No changes from test was necessary, unfortunately, the server can now only do 50k requests/s that was still server a static file with opcache enabled.
I already tested several times and whenever I do fastcgi_pass the sever performance drops about 10x. Maybe 2x performance drop is still difficult to accept but 10x is Massive. I have scoured the web and it seems there was an indeed an issue with nginx connecting to other apps. Hope it gets resolved, I am including a uname -a and nginx -V for reference.
I built 1.11.3 using a spec file that worked with 1.11.2. However, it failed with
src/stream/ngx_stream_proxy_module.c: In function 'ngx_stream_proxy_handler':src/stream/ngx_stream_proxy_module.c:542:6: error: 'ngx_stream_upstream_t {aka struct <anonymous>}' has no member named 'ssl_name' u->ssl_name = uscf->host;
I added --with-stream_ssl_module to the configure call, and successfully rebuilt it.
Line 541 is #if (NGX_HTTP_SSL), should probably be #if (NGX_STREAM_SSL)
Since the update from 1.11.3 to 1.11.4_1, Nginx does not respect custom locations of error logs (but does respect the access_log location).
Regardless of the presence of error_log statement in nginx.conf, the error log is always created in /var/log/nginx/error.log. If the /var/log/nginx folder is removed, an attempt to start nginx (service nginx start) or even test configuration (nginx -t) produces this error message, followed by start-up output normally sent to the error log:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
Downgrading to 1.11.3 restores normal behaviour