Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2013, 07:18 PM   #1
_jal
Junior Member
_jal began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Nov 2013
Device: iPhone
"Too many open files" errors

Hi all,

I'm using Calibre 1.9 (now, although this issue has been present in past versions) on Mac OS X 10.0 (although again, this problem existed on 10.8.3).

Nearly immediately upon starting Calibre, I get this error

Code:
calibre, version 1.9.0
ERROR: Unhandled exception: <b>IOError</b>:[Errno 24] Too many open files: '/Users/jal/Library/Preferences/calibre/gui.json'

Traceback (most recent call last):
  File "site-packages/calibre/gui2/metadata/single_download.py", line 1067, in accept
  File "site-packages/calibre/utils/config.py", line 397, in __setitem__
  File "site-packages/calibre/utils/config.py", line 341, in commit
  File "site-packages/calibre/utils/lock.py", line 113, in __enter__
IOError: [Errno 24] Too many open files: '/Users/jal/Library/Preferences/calibre/gui.json'
This actually started some time back after substantial use; now it will happen after one or two uses of the "Edit Metadata" function (for instance).

Techie notes: I increased the maxfiles limit (via launchctl, the OSX equivalent of other unixen's ulimit), which gave a little headroom and then choked again; I poked around a bit in the code, but I didn't see any obvious file handle leaks, but then again, it is a completely new codebase to me.


My library currently has 3900-odd books; is this a case of the wrong hammer for the job - is Calibre not expected to handle libraries of this size??
_jal is offline   Reply With Quote
Old 11-05-2013, 07:52 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by _jal View Post
My library currently has 3900-odd books; is this a case of the wrong hammer for the job - is Calibre not expected to handle libraries of this size??
Calibre is designed to scale to accommodate quite large libraries. My library is around 13,000 books and there are no issues. Other have reported calibre handling their massive libraries of 50 - 100 thousand books.

Good Luck.

Last edited by DoctorOhh; 11-06-2013 at 12:20 AM. Reason: Removed nonsensical advice
DoctorOhh is offline   Reply With Quote
Advert
Old 11-05-2013, 09:49 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,631
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
There's a program called Tasks Explorer for OS/X that will tell you what files are opened by what processes

BR
BetterRed is offline   Reply With Quote
Old 11-05-2013, 10:18 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You've probably enabled the google images download plugin, which uses a full webkit instance and requires lots of file handles. However, I dont see how it's possible for it to leak file handles, since it runs in a separate process which is shutdown after the download completes.
kovidgoyal is offline   Reply With Quote
Old 04-02-2014, 06:54 AM   #5
stackm
Junior Member
stackm began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2014
Device: Amazon paperwhite
FYI, just wanted to add I have been seeing this error for a few weeks on several different calibre versions. Currently have 1.24 and Mac OS Mavericks. Didn't see it before upgrading OS to Mavericks in October. 5000 ebooks.

calibre, version 1.24.0
ERROR: Unhandled exception: <b>Exception</b>:Failed to open u'/Users/stackm/Calibre Library/x (7512)/cover.jpg' with error: [Errno 24] Too many open files: u'/Users/stackm/Calibre Library/x (7512)/cover.jpg'

Traceback (most recent call last):
File "site-packages/calibre/gui2/cover_flow.py", line 109, in image
File "site-packages/calibre/gui2/library/models.py", line 668, in cover
File "site-packages/calibre/db/legacy.py", line 332, in cover
File "site-packages/calibre/db/cache.py", line 607, in cover
File "site-packages/calibre/db/cache.py", line 57, in call_func_with_lock
File "site-packages/calibre/db/cache.py", line 648, in copy_cover_to
File "site-packages/calibre/db/backend.py", line 1242, in copy_cover_to
Exception: Failed to open u'/Users/stackm/Calibre Library/x(7512)/cover.jpg' with error: [Errno 24] Too many open files: u'/Users/stackm/Calibre Library/x (7512)/cover.jpg'


It doesn't happen immediately, but I will see it after leaving it open for a few hours or overnight.

I did increase file descriptors on the OS. Do not have Google images plugin.

Calibre will refuse to exit, and keep popping up a box with the error. When I click OK it gives the error for a different item. So there is no way to restart it without killing the Calibre process using Activity Monitor.

Will experiment with Tasks Explorer.
stackm is offline   Reply With Quote
Advert
Old 04-02-2014, 07:24 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,198
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can always track open files with the lsof command line tool to see what files are being left open, like this

lsof | grep calibre

Run it repeatedly and see what files are being leaked.

A bit of googling will probably find some GUI versions you can use as well.
kovidgoyal is offline   Reply With Quote
Reply

Tags
bugs, macintosh


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alter Double-click behaviour to "edit metadata" instead of "open ebook?" Feather_Qwill Library Management 5 09-15-2013 11:20 AM
KT "Ghost covers/files" again at 670 books, "stale" image entries in firmware VirgoGirl Kobo Reader 4 04-06-2012 02:10 PM
How to remove "Fully read" books from "Last Open" list? pjeanetta PocketBook 4 12-08-2010 10:30 AM
PDF to WORD/HTML conversion, "special characters and marks" errors chengyibo PDF 3 11-06-2010 12:43 AM


All times are GMT -4. The time now is 04:41 PM.


MobileRead.com is a privately owned, operated and funded community.