Bug #84
Too many open files:
| Status : | Feedback | Start : | 07/09/2008 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | - | % Done : | 0% |
|
| Category : | Maildir | |||
| Target version : | 6.0.0 | Estimated time : | 1.00 hour | |
| Resolution : |
Description
Hi,
wehn trying to copy my entire Mailbox structure from one account to a local repository, I get "Too many open files:" errors --- although, surprisingly, not after 1024 files (the hard limit on my machine) but a little later; the exact error message is:
Thread 'Copy message 1319 from hplx.2002' terminated with exception:
Traceback (most recent call last):
File "/afs/desy.de/user/u/utcke/software/offlineimap-6.0.0/lib/python2.5/site-packages/offlineimap/threadutil.py", line 153, in run
File "/afs/desy.de/user/u/utcke/software/python-2.5.2/lib/python2.5/threading.py", line 446, in run
File "/afs/desy.de/user/u/utcke/software/offlineimap-6.0.0/lib/python2.5/site-packages/offlineimap/folder/Base.py", line 282, in copymessageto
File "/afs/desy.de/user/u/utcke/software/offlineimap-6.0.0/lib/python2.5/site-packages/offlineimap/folder/Maildir.py", line 181, in savemessage
IOError: [Errno 24] Too many open files: '/scratch/utcke/Mail/KOGS/hplx.2002/tmp/1215605617_11.20967.hasgksssven'
If it is any help, this is on:
hasgksssven>/.../utcke% uname -a
Linux hasgksssven 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 26 11:21:10 CDT 2007 i686 i686 i386 GNU/Linux
which for all practical purposes is an 4.x Enterpreise Redhat, even though it says:
hasgksssven>/.../utcke% cat /etc/redhat-release
Scientific Linux SL release 4.4 (Beryllium)
My best guess is that somewhere someone forgot to close some files again, so this ought to be easy to fix...
History
07/16/2008 01:44 PM - John Goerzen
- Status changed from New to Feedback
Can you be certain that there is not some other process on the system opening files?
If you use lsof to examine what files OfflineIMAP has open, how many are there?
07/16/2008 02:34 PM - Sven Utcke
Yes, I'm absolutely certain that it is offlineimap opening the files.
Ok, I ran offlineimap right now and did a
/usr/sbin/lsof | grep offlineimap | wc
about every other minute. Open files at first increase slowly (as offlineimap is checking all the various mailboxes), then rise more quickly once it reaches a big, so far unsynchronized mailbox (the step is a missed lsof or two), then plummets back to 1 once offlineimap has crashed:
81, 106, 118, 131, 149, 157, 170, 182, 186, 189, 189, 189, 190, 191, 192, 195, 211, 220, 233, 247, 262, 275, 286, 292, 298, 311, 324, 337, 346, 353, 355, 366, 373, 380, 388, 397, 410, 416, 416, 416, 419, 438, 464, 491, 511, 538, 560, 589, 611, 635, 656, 766, 793, 821, 854, 884, 911, 942, 970, 999, 1