{"action":"created","issue":{"url":"https://api.github.com/repos/dropwizard/dropwizard/issues/2461","repository_url":"https://api.github.com/repos/dropwizard/dropwizard","labels_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/2461/labels{/name}","comments_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/2461/comments","events_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/2461/events","html_url":"https://github.com/dropwizard/dropwizard/issues/2461","id":351904094,"node_id":"MDU6SXNzdWUzNTE5MDQwOTQ=","number":2461,"title":"Bad Gateway (502) error on Dropwizard 1.3.x","user":{"login":"usulkies","id":10584010,"node_id":"MDQ6VXNlcjEwNTg0MDEw","avatar_url":"https://avatars0.githubusercontent.com/u/10584010?v=4","gravatar_id":"","url":"https://api.github.com/users/usulkies","html_url":"https://github.com/usulkies","followers_url":"https://api.github.com/users/usulkies/followers","following_url":"https://api.github.com/users/usulkies/following{/other_user}","gists_url":"https://api.github.com/users/usulkies/gists{/gist_id}","starred_url":"https://api.github.com/users/usulkies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usulkies/subscriptions","organizations_url":"https://api.github.com/users/usulkies/orgs","repos_url":"https://api.github.com/users/usulkies/repos","events_url":"https://api.github.com/users/usulkies/events{/privacy}","received_events_url":"https://api.github.com/users/usulkies/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-08-19T13:43:31Z","updated_at":"2018-08-29T15:10:26Z","closed_at":"2018-08-23T10:15:10Z","author_association":"NONE","body":"We're trying to upgrade the Dropwizard version from 1.2.x to 1.3.x.\r\nOur services are deployed on AWS EBS, with nginx as LB proxy.\r\nWhen changing the pom.xml dependency and deploying, we're starting to see, occasionally, \"Bad Gateway\" errors returned from nginx.\r\nThey're happening randomly, not at the same tests, and not all the time, but every 2-3 builds.\r\nUsually in relatively heavy POST requests sending PDF content.\r\n\r\nThe nginx log shows errors like:\r\n2018/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\"\r\n\r\n2018/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\"\r\n\r\nWe suspected jetty version, but the errors happens on version 1.3.5 and NOT on 1.2.8 although they're using the same jetty version.\r\nIf you have any explanations, ideas, missing configuration that we should have added except for just replacing the version in the pom file - please instruct us."},"comment":{"url":"https://api.github.com/repos/dropwizard/dropwizard/issues/comments/416989576","html_url":"https://github.com/dropwizard/dropwizard/issues/2461#issuecomment-416989576","issue_url":"https://api.github.com/repos/dropwizard/dropwizard/issues/2461","id":416989576,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjk4OTU3Ng==","user":{"login":"biletnikov","id":28370196,"node_id":"MDQ6VXNlcjI4MzcwMTk2","avatar_url":"https://avatars0.githubusercontent.com/u/28370196?v=4","gravatar_id":"","url":"https://api.github.com/users/biletnikov","html_url":"https://github.com/biletnikov","followers_url":"https://api.github.com/users/biletnikov/followers","following_url":"https://api.github.com/users/biletnikov/following{/other_user}","gists_url":"https://api.github.com/users/biletnikov/gists{/gist_id}","starred_url":"https://api.github.com/users/biletnikov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biletnikov/subscriptions","organizations_url":"https://api.github.com/users/biletnikov/orgs","repos_url":"https://api.github.com/users/biletnikov/repos","events_url":"https://api.github.com/users/biletnikov/events{/privacy}","received_events_url":"https://api.github.com/users/biletnikov/received_events","type":"User","site_admin":false},"created_at":"2018-08-29T15:10:26Z","updated_at":"2018-08-29T15:10:26Z","author_association":"NONE","body":"@sgomadam \r\nthank you,   you are right!\r\n\r\nI set acceptQueueSize to 1024  for the connector and the problem is solved!\r\nAs acceptQueueSize has default OS value in 1.3.5, it is not enough for small EC2 instances.\r\n\r\n@usulkies \r\nyou could back to smaller EC2 instances by increasing acceptQueueSize manually, if it was the only reason to scale them.\r\n\r\nIn general, the problem is not obvious and many people will face it, because DW is used to build microservices,  most of them are tiny and works on small cloud instances.\r\n\r\nI would suggest to discard the default OS acceptQueueSize  or warn about the problem in the config."}}
{"actor":{"display_login":"biletnikov"}}