I think the issue was by ths following , HAproxy is doing GET request, reads http response code and closing connection. Boot is trying to send remaining parts (http headers and some json payload) but connection is already closed. Just replace GET with OPTIONS in the line:
To fix this issue The above nginx error indicate that issue is related to the fastcgi(php-fpm). After enabling the "catch_workers_output" on /etc/php5/fpm/pool.d/www.conf Got the relevant error on php5-fpm.log. Now understand that issue is related to AMQP module.
Spring Boot File Upload - Connection reset by peer error
Hope this helps For anyone having the same problem, I found out this error was caused by a timeout set on file uploads by UI and it is not related to Spring. Now this may not be true for all instances of this error so take a look at this article as well.