Complete.Org: Mailing Lists: Archives: offlineimap: September 2003:
Re: Why I get a error each time cron starts
Home

Re: Why I get a error each time cron starts

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Aaron Kaplan <kaplan@xxxxxxxxxxxxxxxx>
Cc: Rolf Eric Anithason <stockholm@xxxxxxxxxxxxxx>, offlineimap@xxxxxxxxxxxx
Subject: Re: Why I get a error each time cron starts
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Fri, 19 Sep 2003 09:07:59 -0500

On Fri, Sep 19, 2003 at 07:58:39AM +0200, Aaron Kaplan wrote:
> > On Tue, Sep 02, 2003 at 04:58:05PM +0000, Rolf Eric Anithason wrote:
> > > sometimes 
> > > OfflineIMAP crashes, due to big emails because the IMAP server it syncs 
> > > with gives you easily time out, or some problem with UID... so then it 
> > > is important for me to have something that can activate it again so you 
> > > don't miss something important coming in.
> 
> Rolf (like me) thinks that when he starts offlineimap with
> autorefresh, it ought to keep polling for mail until he tells it to
> stop.  If there's some minor error, for example if the connection is
> lost because the imap server got rebooted, it should reconnect, not
> silently crash.

This will be changed once the Twisted rewrite is complete.

> This issue has come up before, and John defended the current behavior
> as the right thing to do.  I don't remember the reasons, but I
> remember that I wasn't convinced.  Offlineimap plays the same role as

It's because, in Python, there's no reliable, safe way to shut down just the
threads relating to a specific account or folder.  With Twisted, there will
no longer be threads, and it will be possible to catch the exceptions at an
appropriate level -- and hopefully to kill things off as appropriate.

> an incoming SMTP server; the only difference is that it's a pull
> instead of a push.  Apparently, if John wrote an SMTP server, he would
> write it so that it accepted incoming mail until the first time a
> sending client timed out during the connection, at which point it

If you want to send me a patch to fix it, or pay me to do it, please go
ahead.

I wrote this software to solve my own problem, and have made it available
because I believed others could find it useful -- and I have added a number
of features and fixed bugs on the request of others.  But my time to devote
to OfflineIMAP is finite, and my priority must lie with the projects that
pay the bills...  Yes, I've given this a low priority.  It's because it
takes a lot of work to fix, and hasn't been worth it to me.

What's more, it seems absurd that someone would attack me in such a manner
without having studied the code first.  "Geez, this sucks, and it's like an
SMTP server, so it should work thay way" reminds me of my old boss that
thought that every project was easier that writing a filesystem and
therefore should take only a week or two.

> would exit, writing a backtrace to the syslog.  Any subsequent
> connection attempts would be refused, and the user would have no idea
> anything was wrong until the next time he scanned the logs.
> 
> John, I assume that you wouldn't actually write an SMTP server like
> that, so what part of the analogy do you take issue with?

An SMTP server is fundamentally different in that each connection is totally
independant of each other connection.  With OfflineIMAP, they are all
related, and moreover, depend on other threads doing their job correctly.

-- John


[Prev in Thread] Current Thread [Next in Thread]