{"action":"created","issue":{"url":"https://api.github.com/repos/envoyproxy/envoy/issues/2919","repository_url":"https://api.github.com/repos/envoyproxy/envoy","labels_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2919/labels{/name}","comments_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2919/comments","events_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2919/events","html_url":"https://github.com/envoyproxy/envoy/issues/2919","id":309198722,"number":2919,"title":"413 error payload too large when use nginx and envoy together","user":{"login":"linsun","id":1588319,"avatar_url":"https://avatars3.githubusercontent.com/u/1588319?v=4","gravatar_id":"","url":"https://api.github.com/users/linsun","html_url":"https://github.com/linsun","followers_url":"https://api.github.com/users/linsun/followers","following_url":"https://api.github.com/users/linsun/following{/other_user}","gists_url":"https://api.github.com/users/linsun/gists{/gist_id}","starred_url":"https://api.github.com/users/linsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linsun/subscriptions","organizations_url":"https://api.github.com/users/linsun/orgs","repos_url":"https://api.github.com/users/linsun/repos","events_url":"https://api.github.com/users/linsun/events{/privacy}","received_events_url":"https://api.github.com/users/linsun/received_events","type":"User","site_admin":false},"labels":[{"id":421403912,"url":"https://api.github.com/repos/envoyproxy/envoy/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-03-28T02:27:43Z","updated_at":"2018-03-28T18:56:15Z","closed_at":null,"author_association":"NONE","body":"*Title*: *413 error payload too large when use nginx and envoy together when posting a file that is bigger than 1Mb.  If I post the file to nginx or envoy by itself, the problem doesn't exist*\r\n\r\n*Description*:\r\nI deployed the simple app from https://github.com/rayh0001/gs-spring-boot-docker to my k8s cluster in ibm cloud.     I also have istio running in my k9s cluster.  \r\n\r\nWhen i send the curl command to the service with a post of a file over 1MB, I'm getting 413.\r\n```\r\n$ curl -svo  /dev/null -F 'file=@405217.pdf' mycluster.us-east.containers.mybluemix.net/scan -H 'transactionId: 11111'  -H 'Cache-Control: no-cache'\r\n*   Trying 169.60.83.14...\r\n* TCP_NODELAY set\r\n* Connected to mycluster.us-east.containers.mybluemix.net (169.60.83.14) port 80 (#0)\r\n> POST /scan HTTP/1.1\r\n> Host: mycluster.us-east.containers.mybluemix.net\r\n> User-Agent: curl/7.54.0\r\n> Accept: */*\r\n> transactionId: 11111\r\n> Cache-Control: no-cache\r\n> Content-Length: 1449466\r\n> Expect: 100-continue\r\n> Content-Type: multipart/form-data; boundary=------------------------c65bbc05407833b1\r\n>\r\n< HTTP/1.1 100 Continue\r\n} [154 bytes data]\r\n< HTTP/1.1 413 Payload Too Large\r\n< Date: Sat, 24 Mar 2018 00:32:08 GMT\r\n< Content-Type: text/plain\r\n< Content-Length: 17\r\n< Connection: keep-alive\r\n* HTTP error before end of send, stop sending\r\n<\r\n{ [17 bytes data]\r\n* Closing connection 0\r\n```\r\n\r\nChatted with @PiotrSikora who suggested to tweak `per_connection_buffer_limit_bytes` to workaround this issue.  I developed a pilot webhook (https://github.com/linsun/istioluawebhook) and the issue is resolved when the webhook is running.\r\n\r\nI wanted to open this issue to see if this is something envoy can fix, e.g. Envoy should slow-down reading from the wire once it exceeds soft watermark.   As a user, I'd prefer this is handled dynamically by envoy.\r\n\r\n* Logs *:\r\n```\r\n[2018-03-13 01:39:55.026][350][debug][http] external/envoy/source/common/http/conn_manager_impl.cc:1310] [C36][S17322680420845703538] request data too large watermark exceeded\r\n```"},"comment":{"url":"https://api.github.com/repos/envoyproxy/envoy/issues/comments/376997695","html_url":"https://github.com/envoyproxy/envoy/issues/2919#issuecomment-376997695","issue_url":"https://api.github.com/repos/envoyproxy/envoy/issues/2919","id":376997695,"user":{"login":"mandarjog","id":800375,"avatar_url":"https://avatars2.githubusercontent.com/u/800375?v=4","gravatar_id":"","url":"https://api.github.com/users/mandarjog","html_url":"https://github.com/mandarjog","followers_url":"https://api.github.com/users/mandarjog/followers","following_url":"https://api.github.com/users/mandarjog/following{/other_user}","gists_url":"https://api.github.com/users/mandarjog/gists{/gist_id}","starred_url":"https://api.github.com/users/mandarjog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandarjog/subscriptions","organizations_url":"https://api.github.com/users/mandarjog/orgs","repos_url":"https://api.github.com/users/mandarjog/repos","events_url":"https://api.github.com/users/mandarjog/events{/privacy}","received_events_url":"https://api.github.com/users/mandarjog/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T18:56:15Z","updated_at":"2018-03-28T18:56:15Z","author_association":"CONTRIBUTOR","body":"@qiwzhang is there a reason to buffer when `state_ == Calling` "}}
{"actor":{"display_login":"mandarjog"}}