title: Python bottle module causes "Error: 413 Request Entity Too Large"
body: <p>Using Python's module <code>bottle</code>, I'm getting HTTP 413 error when posting requests of body size > <code>bottle</code>'s internal <code>MEMFILE_MAX</code> constant. Minimal working example is shown below.</p>
  
  <p>Server part (<code>server.py</code>):</p>
  
  <pre><code>from bottle import *
  
  @post('/test')
  def test():
      return str(len(request.forms['foo']));
  
  def main():
      run(port=8008);
  
  if __name__ == '__main__':
      main();
  </code></pre>
  
  <p>Client part (<code>client.py</code>):</p>
  
  <pre><code>import requests
  
  def main():
      url = 'http://127.0.0.1:8008/test';
  
      r = requests.post(url, data={ 'foo' : 100000 * 'a' });
      print(r.text);
  
      r = requests.post(url, data={ 'foo' : 200000 * 'a' });
      print(r.text);
  
  if __name__ == '__main__':
      main();
  </code></pre>
  
  <p>The first request prints:</p>
  
  <pre><code>100000
  </code></pre>
  
  <p>The second request prints:</p>
  
  <pre><code>...
  &lt;body&gt;
      &lt;h1&gt;Error: 413 Request Entity Too Large&lt;/h1&gt;
      &lt;p&gt;Sorry, the requested URL &lt;tt&gt;&amp;#039;http://127.0.0.1:8008/test&amp;#039;&lt;/tt&gt;
         caused an error:&lt;/p&gt;
      &lt;pre&gt;Request to large&lt;/pre&gt;
  &lt;/body&gt;
  ....
  </code></pre>
  
  <p>I have absolutely no idea how to increase the <code>bottle</code>'s internal limit. Is there any simple way to increase the limit, allowing requests of size, e.g., 1 MB?</p>