{"action":"created","issue":{"url":"https://api.github.com/repos/PerlDancer/Dancer/issues/1129","repository_url":"https://api.github.com/repos/PerlDancer/Dancer","labels_url":"https://api.github.com/repos/PerlDancer/Dancer/issues/1129/labels{/name}","comments_url":"https://api.github.com/repos/PerlDancer/Dancer/issues/1129/comments","events_url":"https://api.github.com/repos/PerlDancer/Dancer/issues/1129/events","html_url":"https://github.com/PerlDancer/Dancer/issues/1129","id":107820959,"number":1129,"title":"Big file uploads and \"Out of memory!\"","user":{"login":"isync","id":1842508,"avatar_url":"https://avatars.githubusercontent.com/u/1842508?v=3","gravatar_id":"","url":"https://api.github.com/users/isync","html_url":"https://github.com/isync","followers_url":"https://api.github.com/users/isync/followers","following_url":"https://api.github.com/users/isync/following{/other_user}","gists_url":"https://api.github.com/users/isync/gists{/gist_id}","starred_url":"https://api.github.com/users/isync/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isync/subscriptions","organizations_url":"https://api.github.com/users/isync/orgs","repos_url":"https://api.github.com/users/isync/repos","events_url":"https://api.github.com/users/isync/events{/privacy}","received_events_url":"https://api.github.com/users/isync/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-22T23:11:05Z","updated_at":"2016-02-07T23:40:44Z","closed_at":"2016-02-07T23:40:44Z","body":"I've noticed that Dancer severely eats up resources when it processes large file uploads, and even sometimes exits with \"Out of memory!\". What is going on in Dancer's file uploads? Isn't it processing uploads chunk-wise, as per common-sense/best practice?\r\n\r\nCan somebody try/reproduce this, please? (...although it's probably me doing something wrong):\r\nClone the Dancer-devel branch, edit file _t/02_request/14_uploads.t_ and append this as test no. 23:\r\n```perl\r\n## test #23\r\n# create a file, 256MB of zeros\r\nsystem(\"dd if=/dev/zero of=$dest_dir/zeros count=250000 bs=1024\");\r\n\r\nmy $resp =\r\n  dancer_response( 'POST', '/upload',\r\n    { files => [ { name => 'test', filename => $dest_dir .'/zeros' } ] } );\r\nis $resp->content, $content;\r\n```\r\n\r\nI'm on a machine with 2,7 GiB memory.\r\n```\r\n$ ulimit -a\r\ncore file size          (blocks, -c) 0\r\ndata seg size           (kbytes, -d) unlimited\r\nscheduling priority             (-e) 0\r\nfile size               (blocks, -f) unlimited\r\npending signals                 (-i) 21761\r\nmax locked memory       (kbytes, -l) 64\r\nmax memory size         (kbytes, -m) unlimited\r\nopen files                      (-n) 1024\r\npipe size            (512 bytes, -p) 8\r\nPOSIX message queues     (bytes, -q) 819200\r\nreal-time priority              (-r) 0\r\nstack size              (kbytes, -s) 8192\r\ncpu time               (seconds, -t) unlimited\r\nmax user processes              (-u) 21761\r\nvirtual memory          (kbytes, -v) unlimited\r\nfile locks                      (-x) unlimited\r\n```"},"comment":{"url":"https://api.github.com/repos/PerlDancer/Dancer/issues/comments/181140864","html_url":"https://github.com/PerlDancer/Dancer/issues/1129#issuecomment-181140864","issue_url":"https://api.github.com/repos/PerlDancer/Dancer/issues/1129","id":181140864,"user":{"login":"bigpresh","id":54107,"avatar_url":"https://avatars.githubusercontent.com/u/54107?v=3","gravatar_id":"","url":"https://api.github.com/users/bigpresh","html_url":"https://github.com/bigpresh","followers_url":"https://api.github.com/users/bigpresh/followers","following_url":"https://api.github.com/users/bigpresh/following{/other_user}","gists_url":"https://api.github.com/users/bigpresh/gists{/gist_id}","starred_url":"https://api.github.com/users/bigpresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigpresh/subscriptions","organizations_url":"https://api.github.com/users/bigpresh/orgs","repos_url":"https://api.github.com/users/bigpresh/repos","events_url":"https://api.github.com/users/bigpresh/events{/privacy}","received_events_url":"https://api.github.com/users/bigpresh/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T23:40:44Z","updated_at":"2016-02-07T23:40:44Z","body":"This issue should have been closed when the PR was merged - closing it now :)"}}