Permalink
Browse files

Merge branch 'bug/memoryerror' into merge

  • Loading branch information...
2 parents 0541936 + 6decc41 commit 11b176bbd2e317fe95041e250ca5a2300f3823c9 @mdomsch mdomsch committed Jan 9, 2014
Showing with 11 additions and 0 deletions.
  1. +11 −0 s3cmd
View
11 s3cmd
@@ -2292,6 +2292,17 @@ if __name__ == '__main__':
sys.stderr.write("See ya!\n")
sys.exit(1)
+ except MemoryError:
+ msg = """
+MemoryError! You have exceeded the amount of memory available for this process.
+This usually occurs when syncing >750,000 files on a 32-bit python instance.
+The solutions to this are:
+1) sync several smaller subtrees; or
+2) use a 64-bit python on a 64-bit OS with >8GB RAM
+ """
+ sys.stderr.write(msg)
+ sys.exit(1)
+
except Exception, e:
report_exception(e)
sys.exit(1)

0 comments on commit 11b176b

Please sign in to comment.