Getting stuck

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Nov 2 09:41:10 GMT 2011


On Sat, 22 Oct 2011 15:57:10 -0400, Dave Abrahams <dave at boostpro.com> wrote:

> 3:37:52 PM	mac.offlineimap[17377]	ERROR: command: APPEND => socket error: <type 'exceptions.IOError'> - Too many read 0
> 3:37:53 PM	mac.offlineimap[17377]	Establishing connection to imap.gmail.com:993.
> 3:37:55 PM	mac.offlineimap[17377]	ERROR: Saving msg in folder 'INBOX', repository 'BoostProRemote' failed. Server reponded: command: APPEND => socket error: <type 'exceptions.IOError'> - Too many read 0
> 3:37:55 PM	mac.offlineimap[17377]	Message content was: Delivered-To: dave at boostpro.com
> 3:37:55 PM	mac.offlineimap[17377]	Received: by 10.52.168.97 with SMTP id zv1cs24464vdb;
> 3:37:55 PM	mac.offlineimap[17377]	        Wed, 31 Aug 2011 13:22:48 -0700 (PDT)
> 3:37:55 PM	mac.offlineimap[17377]	Received: by 10....com
> 3:37:55 PM	mac.offlineimap[17377]	------------=_1314822362-17042-3--
> 3:37:55 PM	mac.offlineimap[17377]	Adding flag S to 26 messages on INBOX
> 3:38:00 PM	mac.offlineimap[17377]	Adding flag R to 3 messages on INBOX
> 3:38:01 PM	mac.offlineimap[17377]	Calling hook: /Users/dave/bin/imap-postsync localhost dave --soft-errors
> 3:38:20 PM	mac.offlineimap[17377]	Adding flag S to 26 messages on .[Gmail].All Mail
> 3:38:20 PM	mac.offlineimap[17377]	Sleeping for 13:00> 

Added 2 commits to my master (and next) branch, that tries harder to
really drop a connection in that case. Let me know if it helps. You will
still get an exception when switching I guess, but it should continue
with a new connection.

Sebastian

commit dd02c307db3365ce64471f440aa7ddc58f5a2917
Author: Sebastian Spaeth <Sebastian at SSpaeth.de>
Date:   Wed Nov 2 10:27:08 2011 +0100

    Drop connection if it might be bad on APPEND
    
    1) Differentiate error messages between imaplib.abort and imaplib.error
    exceptions in the log.
    
    2) Drop connections in the case of imapobj.error, it also might denote a
       broken connection.
    
    Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>

commit 3aded16ed4de691d79581f3b27d4da8dd9bc684d
Author: Sebastian Spaeth <Sebastian at SSpaeth.de>
Date:   Wed Nov 2 10:34:45 2011 +0100

    Make releaseconnection a NOOP when conn is None
    
    During cleanup we often call releaseconnection in a finally: block. But
    in cases of error, we might have dropped the connection earlier already
    and set it to "None". In this case don't fail releaseconnection() but
    make it a NOOP.
    
    Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20111102/40bb4933/attachment.sig>


More information about the OfflineIMAP-project mailing list