1. David Larlet
  2. django-storages
  3. Issues


Issue #39 resolved

[s3boto] Inital File Creation Extremely Slow

Jason Christa
created an issue

This is the test code I am running.

{{{ from django.core.management import setup_environ from my_app import settings

settings.DEBUG = False setup_environ(settings)

from django.core.files.base import File from backends.s3boto import S3BotoStorage

storage = S3BotoStorage('')

image = open(r'/path/to/image.png', 'rb') file = File(image) try: name = 'image.png' name = storage.save(name, file) finally: file.close() print storage.url(name) }}}

These are my settings;


The first time file is called it puts it up on S3 but stalls out afterwards eventually returning an error of an MD5 mismatch. If a file is uploaded to an existing path on S3 there is no error and it completes immediately.

Is there something obvious I am doing wrong in this script? Does anyone else have this problem?

Comments (9)

  1. Ian Lewis

    Hey. The png file isn't just a really big file is it? ;P I figure it's not but just want to make sure.

    I don't really notice a problem here. If you change any of the settings you listed does it change how fast it runs? If you try with a different bucket does it work better?

  2. Jason Christa reporter

    No it was a small file. The delay was the same as the connection timeout I believe and only appeared on Windows machines, so I just ignored it since I deploy on Linux. I haven't followed this up in a while but if the bug still exists it is probably in the boto library.

  3. Log in to comment