I'm running a jetty REST server on AWS - Elastic Beanstalk, with nginx.
The application is running using the Dropwizard framework.
Recently, I've upgraded Dropwizard from version 1.2.2 to 1.3.5.
Then, some of my integration tests started to fail occasionally with Bad Gateway response.
These are the sort of errors I see in nginx error.log:
2018/08/14 05:03:07 [error] 12897#0: *11330 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 10.30.xx.xx, server: , request: "POST /some_url HTTP/1.1", upstream: "http://127.0.0.1:8080/some_url", host: "some_host.local"
2018/08/14 07:37:02 [error] 18575#0: *13099 writev() failed (104: Connection reset by peer) while sending request to upstream, client: 10.30.xx.xx, server: , request: "POST /some_url HTTP/1.1", upstream: "http://127.0.0.1:8080/some_url", host: "some_hostname"
The Dropwizard upgrade changed the jetty version from 9.4.7.v20170914 to 9.4.11.v20180605. Jersey client remained the same version: 2.25.1
It seems that there were some "Bad Gateway" before the upgrade, but their number increased significantly. I cannot imagine right now why this upgrade should have cause this, so I'm open for your ideas.