Change controller name.
Use keepalive feature.
By default fail_timeout is 5 seconds.
The custom error pages must reside in the app server and configure the proxy_intercept_error (by default is off) and enable recursive_error_pages