collectstatic fails with error: [Errno 32] Broken pipe

Issue #191 new
Kunal Kerkar created an issue

I have the following in my settings file and collectstatic always fails with [Errno 32] Broken pipe

DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_STORAGE_BUCKET_NAME = '<bucket_name>'

date_two_months_later = + datetime.timedelta(2 * 365 / 12) 
expires = date_two_months_later.strftime("%A, %d %B %Y 20:00:00 GMT")

    'Expires': expires,
    'Cache-Control': 'max-age=86400',

if not DEBUG:

Comments (6)

  1. Aditya Rajgarhia

    We have been using S3 US-East successfully with django-storages for a while. We now want to use Singapore, but this error occurs rather frequently :(

  2. Akshay Bist

    Wouldn't setting your s3 buckets regions endpoint in your settings, in AWS_S3_HOST fix this?

    PS - Here's a list of s3 endpoints for s3

  3. Chris B

    It would be hacky, but would it be possible to add an offset for the modified date comparison? Right now I assume it checks to see if the updated file is newer than the S3 modified date. What if there was a configurable option that overwrote any files that are "24 hours older or less" or newer than the modified date? This would not be perfect but it would avoid having to sync up timezones.

  4. Log in to comment