From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/79415 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.gnus.general Subject: Re: Gnus hanging Date: Fri, 08 Jul 2011 14:05:01 +0200 Organization: my virtual residence Message-ID: <87pqllq8pe.fsf@yun.yagibdah.de> References: <4ctyazvfec.fsf@news.eternal-september.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1310126726 27039 80.91.229.12 (8 Jul 2011 12:05:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 12:05:26 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M27711@lists.math.uh.edu Fri Jul 08 14:05:21 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf9o7-0000ii-Gw for ding-account@gmane.org; Fri, 08 Jul 2011 14:05:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Qf9o0-0005LT-5Y; Fri, 08 Jul 2011 07:05:12 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Qf9ny-0005L9-Cf for ding@lists.math.uh.edu; Fri, 08 Jul 2011 07:05:10 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1Qf9nw-0004OT-NV for ding@lists.math.uh.edu; Fri, 08 Jul 2011 07:05:10 -0500 Original-Received: from static.103.179.46.78.clients.your-server.de ([78.46.179.103] helo=static.73.179.46.78.clients.your-server.de) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Qf9nq-0007ly-Ne for ding@gnus.org; Fri, 08 Jul 2011 14:05:02 +0200 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.76) (envelope-from ) id 1Qf9np-0003G9-3p for ding@gnus.org; Fri, 08 Jul 2011 14:05:01 +0200 Mail-Followup-To: ding@gnus.org In-Reply-To: (Dave Abrahams's message of "Fri, 08 Jul 2011 07:14:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-1691--6851h-0s--0d--H*UA:Emacs, 0.000-1523--6170h-0s--0d--H*u:Emacs, 0.000-1410--5712h-0s--0d--H*UA:Gnus, 0.000-1410--5711h-0s--0d--H*u:Gnus, 0.000-1352--5478h-0s--0d--H*u:linux Spam tokens: 0.998-1--0h-7s--0d--HX-Spam-Relays-External:sk:static., 0.998-1--0h-7s--0d--H*RU:sk:static., 0.987-1--0h-1s--0d--H*r:sk:clients, 0.966-5794--1380h-53429s--0d--H*r:quimby.gnus.org, 0.911-187--217h-3007s--0d--H*r:sk:static. Autolearn status: no -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 HELO_DYNAMIC_IPADDR Relay HELO'd using suspicious hostname (IP addr 1) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:79415 Archived-At: Dave Abrahams writes: > on Wed Jul 06 2011, Richard Riley wrote: > >> I'm frequently on a wireless connection that fails. Gnus hangs if I do a >> "g" (or more accurately C-u 5 g) in the group buffer to get new headers >> if the link has gone down and come back up again - I assume because of >> non valid network stream handles or whatever. What would be the best way >> to ensure Gnus closes all network links first and reconnects prior to >> the refresh other than quitting or closing/opening from the server >> buffer? > > +1 > > Long-standing issue for me, too. Trying to trace the problem, I've been watching connections with "netstat -t" and found that gnus hangs when the connection to the news server is closed. Gnus reopens the connection and hangs. I've modified the entry for the news server, adding `nntp-connection-timeout' for a timeout of 15 seconds: (add-to-list 'gnus-secondary-select-methods '(nntp "news1.open-news-network.org" (nntp-connection-timeout 15))) Because it takes two hours for the connection to time out, I haven't been able to see if it works yet. If it doesn't work, an alternative might be something like "(gnus-demon-add-handler 'gnus-demon-scan-news 10 nil)" to keep the connection open or "(gnus-demon-add-handler 'gnus-demon-close-connections 5 nil)" to close it before it times out, in which case gnus might gracefully reopen it. Perhaps you can come up with something similar for your POP3 and IMAP connections as a workaround? Closing the connections after a short time or idle period might work for POP3 and IMAP ... BTW, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9020 .