{"action":"created","issue":{"url":"https://api.github.com/repos/rack/rack/issues/1195","repository_url":"https://api.github.com/repos/rack/rack","labels_url":"https://api.github.com/repos/rack/rack/issues/1195/labels{/name}","comments_url":"https://api.github.com/repos/rack/rack/issues/1195/comments","events_url":"https://api.github.com/repos/rack/rack/issues/1195/events","html_url":"https://github.com/rack/rack/issues/1195","id":245243824,"number":1195,"title":"Memory use balloons on large file uploads","user":{"login":"motevets","id":777773,"avatar_url":"https://avatars0.githubusercontent.com/u/777773?v=4","gravatar_id":"","url":"https://api.github.com/users/motevets","html_url":"https://github.com/motevets","followers_url":"https://api.github.com/users/motevets/followers","following_url":"https://api.github.com/users/motevets/following{/other_user}","gists_url":"https://api.github.com/users/motevets/gists{/gist_id}","starred_url":"https://api.github.com/users/motevets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motevets/subscriptions","organizations_url":"https://api.github.com/users/motevets/orgs","repos_url":"https://api.github.com/users/motevets/repos","events_url":"https://api.github.com/users/motevets/events{/privacy}","received_events_url":"https://api.github.com/users/motevets/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-24T23:47:29Z","updated_at":"2017-07-24T23:51:53Z","closed_at":null,"body":"### Description\r\nWe have an app that deals with very large file uploads (~8G).\r\n\r\nWhen we upgraded rack 2.0.3 (as part of a Rails upgrade,) the upload hung seemingly forever, as described in #1075.\r\n\r\nWhen using the most up-to-date master (SHA 877d334a), memory usage went up ~10x from previous version of rack (1.6), and the request failed if the server did not have enough memory.\r\n\r\n### Steps to reproduce\r\n1. create a new Rails app\r\n1. add `gem 'rack', git: 'https://github.com/rack/rack.git', ref: '877d334a4878c4f38d0a8fcec575c73cc5a16978'` to Gemfile\r\n1. create a simple controller that allows file upload\r\n     *(note: see [motevets/rack-large-upload-example-rails-app] for a completed example)*\r\n1. upload a 7.78G file\r\n1. run `watch free` on the server while the request is processing\r\n1. wait for browser to show that the upload is at 100% and waiting for the server to respond\r\n\r\n#### Result\r\nThe peak memory usage during the request was 24G:\r\n```\r\n             total       used       free     shared    buffers     cached\r\nMem:           51G        50G       311M        17M        35M        26G\r\n-/+ buffers/cache:        24G        26G\r\nSwap:           0B         0B         0B\r\n```\r\n#### Expected result\r\n(On rack 1.6) the peak memory usage during the request was 2.4G.:\r\n```\r\n             total       used       free     shared    buffers     cached\r\nMem:           51G        31G        19G        17M        50M        29G\r\n-/+ buffers/cache:       2.4G        48G\r\nSwap:           0B         0B         0B\r\n```\r\n\r\ncc: @michelleheh\r\n\r\n[motevets/rack-large-upload-example-rails-app]: https://github.com/motevets/rack-large-upload-example-rails-app"},"comment":{"url":"https://api.github.com/repos/rack/rack/issues/comments/317587736","html_url":"https://github.com/rack/rack/issues/1195#issuecomment-317587736","issue_url":"https://api.github.com/repos/rack/rack/issues/1195","id":317587736,"user":{"login":"jeremy","id":199,"avatar_url":"https://avatars1.githubusercontent.com/u/199?v=4","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false},"created_at":"2017-07-24T23:51:53Z","updated_at":"2017-07-24T23:51:53Z","body":"/cc @jkowens @tompng "}}
{"actor":{"display_login":"jeremy"}}