title: nginx + fastcgi error when uploading a file over ~60kb
body: <p>Uploading files smaller than 60kb works without a problem, but when I try to upload a larger file, the browser display this error:</p>
  
  <pre><code>An error occurred while reading the request
  </code></pre>
  
  <p>No error in the nginx error logs or any other useful information.</p>
  
  <p>This is my nginx config for this particular script:</p>
  
  <pre><code>location ~ \.(pl|cgi)$ {
      fastcgi_pass unix:/var/run/fcgiwrap.socket;
      fastcgi_index index.cgi;
      include fastcgi_params;
  }
  </code></pre>
  
  <p>And this is a simple perl script I use instead of my original until I can get this working:</p>
  
  <pre><code>#!/usr/bin/perl
  
  print "Content-type: text/html\n\n";
  print "&lt;pre&gt;\n";
  
  foreach $key (sort keys(%ENV)) {
      print "$key = $ENV{$key}&lt;p&gt;";
  }
  print "&lt;/pre&gt;\n";
  </code></pre>
  
  <p>How can I get nginx + fastcgi to work with larger file uploads?</p>