Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

S3 bug demo

A demo of the bug described in this blog post.

To reproduce:

  1. Make a new virtualenv and activate it
  2. pip install -r requirements.txt
  3. Start a moto server in the background: moto_server s3bucket_path &. Moto is a library that implements a fake s3 for use in testing.
  4. Run python This will write a gigabyte of random data to a test key in the moto s3 (in memory, so make sure you have a least a GB of memory available)
  5. Run python & to start the flask server in the background.
  6. curl > /dev/null to retrieve the GB of random test data and send it to /dev/null. Everything will be fine
  7. curl | head -c 10 and watch the memory usage of the server balloon to roughly a gigabyte just after the command returns.