[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mailman-users
Subject:    Re: [Mailman-Users] Strange error with Mailman 2.1.9
From:       Mark Sapiro <mark () msapiro ! net>
Date:       2008-12-01 17:03:43
Message-ID: PC187020081201090343079625520087 () msapiro
[Download RAW message or body]

Richard Hartmann wrote:

>Even more info (should have stated that in the first email):
>
>This is a NFS share. So it might 'just' be a crappy net connection.
>
>Any thoughts about this patch which I plan to apply locally?
>Beware evil GMail linebreaks..
>
>
>--- /usr/lib/mailman/Mailman/Queue/Switchboard.py.orig  2008-12-01
>11:46:31.524425955 +0100
>+++ /usr/lib/mailman/Mailman/Queue/Switchboard.py       2008-12-01
>11:48:39.676765175 +0100
>@@ -134,7 +134,19 @@
>                 fp.write(msgsave)
>                 cPickle.dump(data, fp, protocol)
>                 fp.flush()
>-                os.fsync(fp.fileno())
>+                # os.fsync(fp.fileno())
>+                # Sometimes, the sync to our NFS share fails. This retries
>+                # nine times and then gives up -- RichiH 081201
>+                for trial in xrange(10):
>+                    try:
>+                        os.fsync(fp.fileno())
>+                    except OSError, e:
>+                        if trial == 9 or e.errno != errno.EIO:
>+                            raise
>+                        time.sleep(1)
>+                        continue
>+                    else:
>+                        break
>             finally:
>                 fp.close()
>         finally:


The patch looks OK. Let us know how it works.

-- 
Mark Sapiro <mark@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: http://mail.python.org/mailman/options/mailman-users/mailman-users%40progressive-comp.com

Security Policy: http://wiki.list.org/x/QIA9
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic