From 685ef02000573dc46012fd80960d8e87e1700ff4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 12 Jun 2011 13:16:31 -0600 Subject: [PATCH] Smaller memory limit for spooled file when moving files in db2 --- src/calibre/library/database2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 926ac5527c..67c67b1ff7 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -607,7 +607,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): f = self.format(id, format, index_is_id=True, as_file=True) if f is None: continue - with tempfile.SpooledTemporaryFile(max_size=100*(1024**2)) as stream: + with tempfile.SpooledTemporaryFile(max_size=30*(1024**2)) as stream: with f: shutil.copyfileobj(f, stream) stream.seek(0)