Gnus development mailing list
 help / color / mirror / Atom feed
* Timeouts with nnimap?
@ 2001-03-27  0:30 Lloyd Zusman
  2001-03-27 20:55 ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Lloyd Zusman @ 2001-03-27  0:30 UTC (permalink / raw)


I use gnus to access, via nnimap, my email on an imap server on a
remote host.  Everything else I access via gnus is local to my
machine.

I've been having intermittent problems with my DSL connection, during
which I lose my ability to see anything outside of my local machine.
While I'm having these problems, `gnus-group-get-new-news' and other
similar commands hang forever while gnus tries to access the imap
server for my nnimap group.  This causes gnus to hang in a state that
can only be interrupted by issuing a `kill' command from another
shell.

Is there any way to set a timeout for nnimap, to prevent gnus from
hanging in this case?

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Timeouts with nnimap?
  2001-03-27  0:30 Timeouts with nnimap? Lloyd Zusman
@ 2001-03-27 20:55 ` Simon Josefsson
  2001-03-28 12:12   ` Bjørn Mork
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2001-03-27 20:55 UTC (permalink / raw)
  Cc: ding

Lloyd Zusman <ljz@asfast.com> writes:

> While I'm having these problems, `gnus-group-get-new-news' and other
> similar commands hang forever while gnus tries to access the imap
> server for my nnimap group.  This causes gnus to hang in a state that
> can only be interrupted by issuing a `kill' command from another
> shell.

If C-g doesn't interrupt things, it's probably a emacs problem.

> Is there any way to set a timeout for nnimap, to prevent gnus from
> hanging in this case?

Not from a variable, but perhaps you could add some logic to
`imap-wait-for-tag' (the function that waits for network I/O), I'd
guess it's this function that "hangs".  If it's the built-in
`accept-process-output' function that hangs, this probably can only be
fixed in the emacs core.  Reproducing this outside of Gnus (using
calls to `open-network-stream' etc) would be a good thing to simplify
debugging.



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

* Re: Timeouts with nnimap?
  2001-03-27 20:55 ` Simon Josefsson
@ 2001-03-28 12:12   ` Bjørn Mork
  2001-04-01 14:39     ` Steinar Bang
  0 siblings, 1 reply; 13+ messages in thread
From: Bjørn Mork @ 2001-03-28 12:12 UTC (permalink / raw)


Simon Josefsson <simon@josefsson.org> writes:
> Lloyd Zusman <ljz@asfast.com> writes:
> 
> > While I'm having these problems, `gnus-group-get-new-news' and other
> > similar commands hang forever while gnus tries to access the imap
> > server for my nnimap group.  This causes gnus to hang in a state that
> > can only be interrupted by issuing a `kill' command from another
> > shell.
> 
> If C-g doesn't interrupt things, it's probably a emacs problem.

Well, there is something strange with nnimap connections. The
behaviour is different from nntp when you lose network connectivity
while having open connections. I guess that is somewhat reasonable
since the nnimap client will need to syncronize state with the server
before closing. But it would still be useful to have some way to force
a nnimap server disconnect. I sometimes forget closing or unplugging
before moving my laptop between networks, and then I am lost: The
nnimap connections cannot be killed without exiting from Gnus.


Bjørn


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

* Re: Timeouts with nnimap?
  2001-03-28 12:12   ` Bjørn Mork
@ 2001-04-01 14:39     ` Steinar Bang
  2001-04-01 20:29       ` Kai Großjohann
  0 siblings, 1 reply; 13+ messages in thread
From: Steinar Bang @ 2001-04-01 14:39 UTC (permalink / raw)


>>>>> "Bjørn Mork" <bmork@dod.no>:

> Well, there is something strange with nnimap connections. The
> behaviour is different from nntp when you lose network connectivity
> while having open connections. I guess that is somewhat reasonable
> since the nnimap client will need to syncronize state with the
> server before closing. But it would still be useful to have some way
> to force a nnimap server disconnect. I sometimes forget closing or
> unplugging before moving my laptop between networks, and then I am
> lost: The nnimap connections cannot be killed without exiting from
> Gnus.

One thing I would have liked, is to get up a buffer of open
connections, similar to what you see when you do `C-x C-c' when you
have open connections, and that you can use to close the open
connections. 

I normally operate Gnus unplugged, and just do short "dives" into
pluggedness to fetch mail and news from various servers, so I only
encounter this when something get stuck during a fetch from somewhere.


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

* Re: Timeouts with nnimap?
  2001-04-01 14:39     ` Steinar Bang
@ 2001-04-01 20:29       ` Kai Großjohann
  2001-04-01 20:49         ` Bjørn Mork
  2001-04-02  6:21         ` Steinar Bang
  0 siblings, 2 replies; 13+ messages in thread
From: Kai Großjohann @ 2001-04-01 20:29 UTC (permalink / raw)
  Cc: ding

On 01 Apr 2001, Steinar Bang wrote:

> One thing I would have liked, is to get up a buffer of open
> connections, similar to what you see when you do `C-x C-c' when you
> have open connections, and that you can use to close the open
> connections. 

>From the Group buffer, `^' lists all servers, but isn't that enough?

kai
-- 
Be indiscrete.  Do it continuously.


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

* Re: Timeouts with nnimap?
  2001-04-01 20:29       ` Kai Großjohann
@ 2001-04-01 20:49         ` Bjørn Mork
  2001-04-01 21:22           ` Kai Großjohann
  2001-04-02  6:21         ` Steinar Bang
  1 sibling, 1 reply; 13+ messages in thread
From: Bjørn Mork @ 2001-04-01 20:49 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On 01 Apr 2001, Steinar Bang wrote:
> 
> > One thing I would have liked, is to get up a buffer of open
> > connections, similar to what you see when you do `C-x C-c' when you
> > have open connections, and that you can use to close the open
> > connections. 
> 
> From the Group buffer, `^' lists all servers, but isn't that enough?

Nope. A nnimap server cannot be closed or denied unless the connection
to it is working. Change your IP-address or just unplug the cable and
you are screwed.


Bjørn
-- 
Save the cardboard cut-outs!  


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

* Re: Timeouts with nnimap?
  2001-04-01 20:49         ` Bjørn Mork
@ 2001-04-01 21:22           ` Kai Großjohann
  2001-04-02  8:42             ` Bjørn Mork
  0 siblings, 1 reply; 13+ messages in thread
From: Kai Großjohann @ 2001-04-01 21:22 UTC (permalink / raw)
  Cc: ding

On 01 Apr 2001, Bjørn Mork wrote:

> Nope. A nnimap server cannot be closed or denied unless the
> connection to it is working. Change your IP-address or just unplug
> the cable and you are screwed.

Really?  I didn't know that.  Oh.

Lars has just recently added a M-x gnus-close-all-servers RET to Oort
Gnus.  But I presume that also fails in this case.

Is this specific to nnimap, or does it also happen with nntp, say?

kai
-- 
Be indiscrete.  Do it continuously.


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

* Re: Timeouts with nnimap?
  2001-04-02  6:21         ` Steinar Bang
@ 2001-04-02  2:47           ` Simon Josefsson
  2001-04-02 10:25             ` Bjørn Mork
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2001-04-02  2:47 UTC (permalink / raw)
  Cc: ding

Steinar Bang <sb@metis.no> writes:

> nnimap server up and running, and let Gnus stay connected long enough
> for the network to go flaky on you.
> 
> You also get it, as Bjørn pointed out, if you suspend a laptop without
> unplugging Gnus, and then resuming it in a different network.
> 
> `C-x C-c' and starting a new emacs, is then the only option.

You can delete the " *nnimap* yourserver*" buffer too.

Maybe we could add a backend function `nnfoo-force-close-server'?
That could be called if you do C-u C in the server buffer?  Or perhaps
`nnimap-close-server' simply shouldn't try to be nice to server, and
just kill the buffer after 5s or something.



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

* Re: Timeouts with nnimap?
  2001-04-01 20:29       ` Kai Großjohann
  2001-04-01 20:49         ` Bjørn Mork
@ 2001-04-02  6:21         ` Steinar Bang
  2001-04-02  2:47           ` Simon Josefsson
  1 sibling, 1 reply; 13+ messages in thread
From: Steinar Bang @ 2001-04-02  6:21 UTC (permalink / raw)


>>>>> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann):

> On 01 Apr 2001, Steinar Bang wrote:

>> One thing I would have liked, is to get up a buffer of open
>> connections, similar to what you see when you do `C-x C-c' when you
>> have open connections, and that you can use to close the open
>> connections.

> From the Group buffer, `^' lists all servers, but isn't that enough?

No.  As Bjørn pointed out, it's not the servers, it's the stuck
connections that are the problem.

You run into this problem pretty frequently, if you have more than one
nnimap server up and running, and let Gnus stay connected long enough
for the network to go flaky on you.

You also get it, as Bjørn pointed out, if you suspend a laptop without
unplugging Gnus, and then resuming it in a different network.

`C-x C-c' and starting a new emacs, is then the only option.


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

* Re: Timeouts with nnimap?
  2001-04-01 21:22           ` Kai Großjohann
@ 2001-04-02  8:42             ` Bjørn Mork
  0 siblings, 0 replies; 13+ messages in thread
From: Bjørn Mork @ 2001-04-02  8:42 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On 01 Apr 2001, Bjørn Mork wrote:
> 
> > Nope. A nnimap server cannot be closed or denied unless the
> > connection to it is working. Change your IP-address or just unplug
> > the cable and you are screwed.
> 
> Really?  I didn't know that.  Oh.
> 
> Lars has just recently added a M-x gnus-close-all-servers RET to Oort
> Gnus.  But I presume that also fails in this case.
> 
> Is this specific to nnimap, or does it also happen with nntp, say?

I have no such problems with nntp.


Bjørn
-- 
Why, technology is evil!  


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

* Re: Timeouts with nnimap?
  2001-04-02  2:47           ` Simon Josefsson
@ 2001-04-02 10:25             ` Bjørn Mork
  2001-04-02 10:36               ` Steinar Bang
  0 siblings, 1 reply; 13+ messages in thread
From: Bjørn Mork @ 2001-04-02 10:25 UTC (permalink / raw)


Simon Josefsson <simon@josefsson.org> writes:
> Steinar Bang <sb@metis.no> writes:
> 
> > nnimap server up and running, and let Gnus stay connected long enough
> > for the network to go flaky on you.
> > 
> > You also get it, as Bjørn pointed out, if you suspend a laptop without
> > unplugging Gnus, and then resuming it in a different network.
> > 
> > `C-x C-c' and starting a new emacs, is then the only option.
> 
> You can delete the " *nnimap* yourserver*" buffer too.

Ah, now *that's* intuitive ;-)

> Maybe we could add a backend function `nnfoo-force-close-server'?
> That could be called if you do C-u C in the server buffer?  Or perhaps
> `nnimap-close-server' simply shouldn't try to be nice to server, and
> just kill the buffer after 5s or something.

I would prefer the latter. Preferably with a warning to allow people
to fix their network connection in case the error is caused by an
unintentional disconnect.


Bjørn


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

* Re: Timeouts with nnimap?
  2001-04-02 10:25             ` Bjørn Mork
@ 2001-04-02 10:36               ` Steinar Bang
  2001-04-02 15:12                 ` Bjørn Mork
  0 siblings, 1 reply; 13+ messages in thread
From: Steinar Bang @ 2001-04-02 10:36 UTC (permalink / raw)


>>>>> "Bjørn Mork" <bmork@dod.no>:

> Simon Josefsson <simon@josefsson.org> writes:

>> Maybe we could add a backend function `nnfoo-force-close-server'?
>> That could be called if you do C-u C in the server buffer?  Or
>> perhaps `nnimap-close-server' simply shouldn't try to be nice to
>> server, and just kill the buffer after 5s or something.

> I would prefer the latter.

Agreed.  Maybe not as little as 5s though.  Make it 15s (worst case
for me, is that I have three nnimap server I need to close when I
suspend my laptop to run for the train.  I can live with 45s in this
case).

> Preferably with a warning to allow people to fix their network
> connection in case the error is caused by an unintentional
> disconnect.

Hm... not sure I see what this warning is for, and what the user is
supposed to do with the information?


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

* Re: Timeouts with nnimap?
  2001-04-02 10:36               ` Steinar Bang
@ 2001-04-02 15:12                 ` Bjørn Mork
  0 siblings, 0 replies; 13+ messages in thread
From: Bjørn Mork @ 2001-04-02 15:12 UTC (permalink / raw)


Steinar Bang <sb@metis.no> writes:
> >>>>> "Bjørn Mork" <bmork@dod.no>:
> 
> > Preferably with a warning to allow people to fix their network
> > connection in case the error is caused by an unintentional
> > disconnect.
> 
> Hm... not sure I see what this warning is for, and what the user is
> supposed to do with the information?

Plug in the ethernet cable or wlan card. I forget that all the
time. Probably just me...


Bjørn


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

end of thread, other threads:[~2001-04-02 15:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-27  0:30 Timeouts with nnimap? Lloyd Zusman
2001-03-27 20:55 ` Simon Josefsson
2001-03-28 12:12   ` Bjørn Mork
2001-04-01 14:39     ` Steinar Bang
2001-04-01 20:29       ` Kai Großjohann
2001-04-01 20:49         ` Bjørn Mork
2001-04-01 21:22           ` Kai Großjohann
2001-04-02  8:42             ` Bjørn Mork
2001-04-02  6:21         ` Steinar Bang
2001-04-02  2:47           ` Simon Josefsson
2001-04-02 10:25             ` Bjørn Mork
2001-04-02 10:36               ` Steinar Bang
2001-04-02 15:12                 ` Bjørn Mork

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