From: Ted Zlatanov <tzz@lifelogs.com>
To: Katsumi Yamaoka <yamaoka@jpl.org>
Cc: ding@gnus.org, Simon Josefsson <simon@josefsson.org>
Subject: Re: closing all inactive server connections
Date: Thu, 02 Aug 2007 15:51:09 -0400 [thread overview]
Message-ID: <m21welzpea.fsf@lifelogs.com> (raw)
In-Reply-To: <b4modhtrm3o.fsf@jpl.org> (Katsumi Yamaoka's message of "Tue, 31 Jul 2007 17:52:42 +0900")
On Tue, 31 Jul 2007 17:52:42 +0900 Katsumi Yamaoka <yamaoka@jpl.org> wrote:
>>>>>> Ted Zlatanov wrote:
KY> --- nntp.el~ 2007-07-18 12:07:39 +0000
KY> +++ nntp.el 2007-07-31 03:04:52 +0000
>> I tried it and the IMAP server still hangs. Maybe the fix is in
>> nnimap.el? I haven't looked deeper into this issue but I'll be glad to
>> debug things on my side.
KY> Is the patch effective for the hanged nntp connections?
My NNTP connections are OK.
KY> Well, I tried looking into the IMAP code although I've never
KY> used nnimap. And I found the functions that communicate with
KY> the server all have the following form:
KY> (while (and (memq (process-status PROCESS) '(open run))
KY> (wait-for-a-string-that-the-PROCESS-returns))
KY> (accept-process-output PROCESS 1)
KY> (sit-for 1))
KY> This can be an infinite loop if the process-status keeps `open'
KY> or `run' even though the connection has actually died. In
KY> particular, the `imap-wait-for-tag' function can be the cause of
KY> the hanging since it sends the LOGOUT command to the dead server
KY> and waits for the response. So, I tried modifying it so as to
KY> quit in a certain time. The patch to imap.el is below. Anyway,
KY> it needs to be reviewed by someone who is skilled in IMAP. The
KY> default value of `imap-timeout-seconds' might be too small for
KY> slow connections.
I tried this and it works fine. If Simon is around, he can take a look,
but I tested it over 6 hours of IMAP/NNTP use and had no problems. If
anyone else can verify that it works, this would be a great addition to
Gnus.
Maybe it should be generalized, however, to an IMAP timeout per (server,
group name, command) combination (as a regex or a function), so you can
assign "LOGOUT" a longer timeout with a slower server. This could also
be a server tuning parameter for nnimap instead of an imap.el parameter.
Thank you for the help!
Ted
next prev parent reply other threads:[~2007-08-02 19:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 15:59 Ted Zlatanov
2007-07-10 19:54 ` Ted Zlatanov
2007-07-19 13:46 ` Ted Zlatanov
2007-07-27 17:06 ` Ted Zlatanov
2007-07-28 0:18 ` Ted Zlatanov
2007-07-30 6:22 ` Katsumi Yamaoka
2007-07-30 15:39 ` Ted Zlatanov
2007-07-31 2:57 ` Katsumi Yamaoka
2007-07-31 3:08 ` Katsumi Yamaoka
2007-07-31 3:19 ` Ted Zlatanov
2007-07-31 8:52 ` Katsumi Yamaoka
2007-08-02 19:51 ` Ted Zlatanov [this message]
2007-08-15 11:28 ` Simon Josefsson
2007-08-16 7:18 ` Katsumi Yamaoka
2007-08-16 7:25 ` Katsumi Yamaoka
2007-08-16 9:49 ` Simon Josefsson
2007-08-16 15:35 ` Ted Zlatanov
2007-08-16 15:32 ` Ted Zlatanov
2007-08-16 15:56 ` Ted Zlatanov
2007-08-16 23:19 ` Katsumi Yamaoka
2007-08-16 23:25 ` Ted Zlatanov
2007-08-16 23:47 ` Katsumi Yamaoka
2007-08-17 11:09 ` Katsumi Yamaoka
2007-09-10 14:52 ` Ted Zlatanov
2007-08-15 18:28 ` Reiner Steib
2007-07-31 3:16 ` Ted Zlatanov
2007-07-31 3:19 ` Katsumi Yamaoka
2007-07-31 2:58 ` untabify Lisp sources (was Re: closing all inactive server connections) Katsumi Yamaoka
2007-07-31 22:05 ` untabify Lisp sources Reiner Steib
2007-08-01 2:44 ` Ted Zlatanov
2007-07-31 22:57 ` Miles Bader
2007-08-01 2:46 ` Ted Zlatanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m21welzpea.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
--cc=simon@josefsson.org \
--cc=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).