Gnus development mailing list
 help / color / mirror / Atom feed
* Dealing with hanging IMAP connections
@ 2009-11-22 21:18 David Engster
  2009-11-22 22:48 ` John Sullivan
  2009-11-22 22:58 ` Reiner Steib
  0 siblings, 2 replies; 9+ messages in thread
From: David Engster @ 2009-11-22 21:18 UTC (permalink / raw)
  To: ding

On my notebook, which is connected via WLAN, my IMAP connection hangs
from time to time. When this happens, I completely have to restart Gnus,
which I find pretty annoying. Stefan Monnier posted a patch to
emacs-help which will open a new connection when you interrupt the
current IMAP operation with C-g. I've applied this patch to my
installation and find it very useful. I think this or something similar
should be applied to imap.el, preferably as a customizable option?

Here's the link to Stefan's post:

http://article.gmane.org/gmane.emacs.help/69934

Regards,
David



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 21:18 Dealing with hanging IMAP connections David Engster
@ 2009-11-22 22:48 ` John Sullivan
  2009-11-23  7:59   ` Frank Schmitt
                     ` (3 more replies)
  2009-11-22 22:58 ` Reiner Steib
  1 sibling, 4 replies; 9+ messages in thread
From: John Sullivan @ 2009-11-22 22:48 UTC (permalink / raw)
  To: ding

David Engster <deng@randomsample.de> writes:

> On my notebook, which is connected via WLAN, my IMAP connection hangs
> from time to time. When this happens, I completely have to restart Gnus,
> which I find pretty annoying. Stefan Monnier posted a patch to
> emacs-help which will open a new connection when you interrupt the
> current IMAP operation with C-g. I've applied this patch to my
> installation and find it very useful. I think this or something similar
> should be applied to imap.el, preferably as a customizable option?
>
> Here's the link to Stefan's post:
>
> http://article.gmane.org/gmane.emacs.help/69934

Thanks, I'll check that out.

In these situations, you might also try M-x list-processes, then
(kill-process "imap") or "imap<1>" etc. That's what I often have to do
when I change networks.

-- 
John Sullivan
Emacs Planner Maintainer
http://wjsullivan.net/PlannerMode.html
GPG Key: AE8600B6




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 21:18 Dealing with hanging IMAP connections David Engster
  2009-11-22 22:48 ` John Sullivan
@ 2009-11-22 22:58 ` Reiner Steib
  2009-11-23  3:02   ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2009-11-22 22:58 UTC (permalink / raw)
  To: ding; +Cc: Stefan Monnier

On Sun, Nov 22 2009, David Engster wrote:

> On my notebook, which is connected via WLAN, my IMAP connection hangs
> from time to time. When this happens, I completely have to restart Gnus,
> which I find pretty annoying. Stefan Monnier posted a patch to
> emacs-help which will open a new connection when you interrupt the
> current IMAP operation with C-g. I've applied this patch to my
> installation and find it very useful. I think this or something similar
> should be applied to imap.el, preferably as a customizable option?

Usually Stefan has a reason not to install a patch upstream, e.g. if
he knows about problems with the patch or if he thinks the solution
isn't clean.  Stefan?  (--> Cc-ed).

> Here's the link to Stefan's post:
>
> http://article.gmane.org/gmane.emacs.help/69934

[ What's all this report-emacs-bug/backtrace output about? ]

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 22:58 ` Reiner Steib
@ 2009-11-23  3:02   ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2009-11-23  3:02 UTC (permalink / raw)
  To: ding

>> On my notebook, which is connected via WLAN, my IMAP connection hangs
>> from time to time. When this happens, I completely have to restart Gnus,
>> which I find pretty annoying. Stefan Monnier posted a patch to
>> emacs-help which will open a new connection when you interrupt the
>> current IMAP operation with C-g. I've applied this patch to my
>> installation and find it very useful. I think this or something similar
>> should be applied to imap.el, preferably as a customizable option?

> Usually Stefan has a reason not to install a patch upstream, e.g. if
> he knows about problems with the patch or if he thinks the solution
> isn't clean.  Stefan?  (--> Cc-ed).

Well, the reason is that I don't know that it's the right solution.
It feels like a workaround more than anything.  If the problem is in
gnutls or openssl, then it's maybe OK to have a workaround, but
otherwise we'd want a real fix.

But even if a workaround is OK, I'm not sure this one is the right one.
I just don't understand enough of Gnus's convention for how to handle
connection deaths, timeouts, and automatic reconnects to know where it
should be handled.

>> Here's the link to Stefan's post:
>> http://article.gmane.org/gmane.emacs.help/69934
> [ What's all this report-emacs-bug/backtrace output about? ]

IIRC it's a backtrace that shows a call to accept-process-output with
inhibit-quit bound to t, i.e. a call that could freeze Emacs hard.
That's why the patch includes a with-local-quit.


        Stefan



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 22:48 ` John Sullivan
@ 2009-11-23  7:59   ` Frank Schmitt
  2009-11-30 10:30     ` Bojan Nikolic
  2009-11-23 15:50   ` David Engster
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Frank Schmitt @ 2009-11-23  7:59 UTC (permalink / raw)
  To: ding

John Sullivan <john@wjsullivan.net> writes:

> David Engster <deng@randomsample.de> writes:
>
>> On my notebook, which is connected via WLAN, my IMAP connection hangs
>> from time to time. When this happens, I completely have to restart Gnus,
>> which I find pretty annoying. Stefan Monnier posted a patch to
>> emacs-help which will open a new connection when you interrupt the
>> current IMAP operation with C-g. I've applied this patch to my
>> installation and find it very useful. I think this or something similar
>> should be applied to imap.el, preferably as a customizable option?
>>
>> Here's the link to Stefan's post:
>>
>> http://article.gmane.org/gmane.emacs.help/69934
>
> Thanks, I'll check that out.
>
> In these situations, you might also try M-x list-processes, then
> (kill-process "imap") or "imap<1>" etc. That's what I often have to do
> when I change networks.

Me too. I use ssl so I have to "killall openssl" in a shell.

-- 
Have you ever considered how much text can fit in eighty columns?  Given that a
signature typically contains up to four lines of text, this space allows you to
attach a tremendous amount of valuable information to your messages.  Seize the
opportunity and don't waste your signature on bullshit that nobody cares about.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 22:48 ` John Sullivan
  2009-11-23  7:59   ` Frank Schmitt
@ 2009-11-23 15:50   ` David Engster
  2009-11-29  1:06   ` Ludovic Courtès
  2009-11-30  8:53   ` Steinar Bang
  3 siblings, 0 replies; 9+ messages in thread
From: David Engster @ 2009-11-23 15:50 UTC (permalink / raw)
  To: John Sullivan; +Cc: ding

John Sullivan <john@wjsullivan.net> writes:
> David Engster <deng@randomsample.de> writes:
>
>> On my notebook, which is connected via WLAN, my IMAP connection hangs
>> from time to time. When this happens, I completely have to restart Gnus,
>> which I find pretty annoying. Stefan Monnier posted a patch to
>> emacs-help which will open a new connection when you interrupt the
>> current IMAP operation with C-g. I've applied this patch to my
>> installation and find it very useful. I think this or something similar
>> should be applied to imap.el, preferably as a customizable option?
>>
>> Here's the link to Stefan's post:
>>
>> http://article.gmane.org/gmane.emacs.help/69934
>
> Thanks, I'll check that out.
>
> In these situations, you might also try M-x list-processes, then
> (kill-process "imap") or "imap<1>" etc. That's what I often have to do
> when I change networks.

Ah, thanks! That indeed does the trick. I bound that kill-process
command to a key and it works really well. It'd still be nice if Gnus
would do that automatically after some time-out is reached, but I can
live with manually killing the IMAP process for the time being. :-)

Regards,
-David



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 22:48 ` John Sullivan
  2009-11-23  7:59   ` Frank Schmitt
  2009-11-23 15:50   ` David Engster
@ 2009-11-29  1:06   ` Ludovic Courtès
  2009-11-30  8:53   ` Steinar Bang
  3 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2009-11-29  1:06 UTC (permalink / raw)
  To: ding

Hello,

John Sullivan <john@wjsullivan.net> writes:

> In these situations, you might also try M-x list-processes, then
> (kill-process "imap") or "imap<1>" etc. That's what I often have to do
> when I change networks.

Same for me.  That’s also what I do when the laptop resumes from
suspend-to-{disk,ram}.

(Surprisingly, ‘gnus-agent-toggle-plugged’ doesn’t kill the relevant
processes.)

In theory we should be able to react to the appropriate D-Bus signals to
run ‘kill-process’.  Has anyone looked into it?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-22 22:48 ` John Sullivan
                     ` (2 preceding siblings ...)
  2009-11-29  1:06   ` Ludovic Courtès
@ 2009-11-30  8:53   ` Steinar Bang
  3 siblings, 0 replies; 9+ messages in thread
From: Steinar Bang @ 2009-11-30  8:53 UTC (permalink / raw)
  To: ding

>>>>> John Sullivan <john@wjsullivan.net>:

> In these situations, you might also try M-x list-processes, then
> (kill-process "imap") or "imap<1>" etc. That's what I often have to do
> when I change networks.

Changing networks is usually ok, at least if you remember to unplug gnus
before sleeping the machine.  But changing NIC (e.g. from a wired NIC to
a WLAN NIC, or a 3G connection), can confuse Gnus so badly, you're
better off starting a new Gnus in a new emacs...




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Dealing with hanging IMAP connections
  2009-11-23  7:59   ` Frank Schmitt
@ 2009-11-30 10:30     ` Bojan Nikolic
  0 siblings, 0 replies; 9+ messages in thread
From: Bojan Nikolic @ 2009-11-30 10:30 UTC (permalink / raw)
  To: ding


Frank Schmitt <ich@frank-schmitt.net> writes:

> John Sullivan <john@wjsullivan.net> writes:
>
>> David Engster <deng@randomsample.de> writes:
>>
>>> On my notebook, which is connected via WLAN, my IMAP connection hangs
>>> from time to time. When this happens, I completely have to restart Gnus,
>>> which I find pretty annoying. Stefan Monnier posted a patch to
>>> emacs-help which will open a new connection when you interrupt the
>>> current IMAP operation with C-g. I've applied this patch to my
>>> installation and find it very useful. I think this or something similar
>>> should be applied to imap.el, preferably as a customizable option?
>>>
>>> Here's the link to Stefan's post:
>>>
>>> http://article.gmane.org/gmane.emacs.help/69934
>>
>> Thanks, I'll check that out.
>>
>> In these situations, you might also try M-x list-processes, then
>> (kill-process "imap") or "imap<1>" etc. That's what I often have to do
>> when I change networks.
>
> Me too. I use ssl so I have to "killall openssl" in a shell.

I resort to this very often too. I always I assumed that this is a bug
with openssl, it really ought to figure out that it won't be able to
restore its connection and terminate it. 

One way of working around it would be to shorten the openssl ssl session
timeout, but I haven't been able to find the way to do that. Maybe
somebody here knows?



-- 
Bojan Nikolic          ||          http://www.bnikolic.co.uk




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-11-30 10:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-22 21:18 Dealing with hanging IMAP connections David Engster
2009-11-22 22:48 ` John Sullivan
2009-11-23  7:59   ` Frank Schmitt
2009-11-30 10:30     ` Bojan Nikolic
2009-11-23 15:50   ` David Engster
2009-11-29  1:06   ` Ludovic Courtès
2009-11-30  8:53   ` Steinar Bang
2009-11-22 22:58 ` Reiner Steib
2009-11-23  3:02   ` Stefan Monnier

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).