title: How to Upload Large Files on Heroku (Particularly Videos)
body: <p>I'm using heroku to host a web application with the primary focus of hosting videos. The videos are hosted through vimeo pro, and I'm using the <a href="https://github.com/matthooks/vimeo" rel="nofollow noreferrer">vimeo gem by matthooks</a> to help handle the upload process. <strong>Upload works for small files, but not for larger ones</strong> (~50mb, for example).</p>
  
  <p>A look at heroku logs shows that I am getting http error 413, which stands for "Request Entity Too Large." I believe this might have to do with a limit that heroku places on file uploads (greater than 30mb, <a href="https://stackoverflow.com/questions/8032232/enforce-file-upload-size-on-heroku">according to this webpage</a>). The problem though is that any information I can find on the subject seems to be outdated and conflicting (like this page that <a href="https://groups.google.com/forum/?fromgroups#!topic/heroku/6zdLfFfjHfs" rel="nofollow noreferrer">claims there is no size limit</a>). I also couldn't find anything on heroku's site about this.</p>
  
  <p>I've searched google and found a few somewhat relevant pages (<a href="https://groups.google.com/forum/?fromgroups#!topic/carrierwave/QpAQMUAo9NY" rel="nofollow noreferrer">one</a> and <a href="http://comments.gmane.org/gmane.comp.lang.ruby.rails.heroku/3517" rel="nofollow noreferrer">two</a>), but no solutions that worked for me. Most of the pages I found deal with uploading large files to amazon s3, which is different from what I'm trying to do.</p>
  
  <p>Here's the relevant output of the logs: </p>
  
  <pre><code>2012-07-18T05:13:31+00:00 heroku[nginx]: 152.3.68.6 - - [18/Jul/2012:05:13:31 +0000]
    "POST /videos HTTP/1.1" 413 192 "http://neoteach.com/components/19" "Mozilla/5.0 
    (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1" neoteach.com
  </code></pre>
  
  <p><strong>There are no other errors in the logs.</strong> This is the only output that appears when I try to upload a video that is too large. Which means that this is not a timeout error or a problem with exceeding the allotted memory per dyno.</p>
  
  <p>Does heroku really place a limit on upload sizes? If so, is there any way to change this limit? Note that the files themselves are not being stored on heroku's servers at all, they are merely being passed on to vimeo's servers.</p>
  
  <p>If the problem is not limit on upload sizes, does anyone have an idea of what else might be going wrong?</p>
  
  <p>Much thanks!</p>