Skip Menu |

This queue is for tickets about the Pod-Webserver CPAN distribution.

Report information
The Basics
Id: 21582
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: Pod-Webserver

People
Owner: Nobody in particular
Requestors: ivor.williams [...] lch-clearnet.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.03
Fixed in: (no value)



Subject: podwebserver exits for no apparent reason
I'm running podwebserver to serve perldocs out to my fellow dev team members. I want this process to keep on running forever (until I stop it), but it seems to exit at some arbitrary point. I get no message on STDERR or STDOUT, and I don't think it's being killed. Is there some inactivity timeout event happening? Is this a feature of HTTP::Daemon? I can work around the problem with a shell loop, but if this is expected behaviour, it needs to be documented.
From: IVORW [...] cpan.org
The server seems to stay up for 5 hours, almost to the minute. Is this a timeout period somewhere?
From: IVORW [...] cpan.org
Found it! There is a timeout after 5 hours of inactivity. From line 160 of lib/Pod/Webserver.pm #====================================================================== ==== sub new_daemon { my $self = shift; my @opts = ( defined($self->httpd_host) ? (LocalHost => $self->httpd_host) : (), LocalPort => $self->httpd_port || 8020, Timeout => defined($self->httpd_timeout) ? $self->httpd_timeout : (5*3600), # exit after 5H idle ); $self->muse( "Starting daemon with options {@opts}" ); HTTP::Daemon->new(@opts) || die "Can't start a daemon: $!\nAborting"; } #====================================================================== ==== Despite the fact that this is a default timeout value, there's no way of passing in a different number. Ideally, for my instance I want no timeout at all, and for the daemon script to keep running. This would require a new command line option to the podwebserver script.
Subject: Re: [rt.cpan.org #21582] podwebserver exits for no apparent reason
Date: Tue, 03 Oct 2006 14:58:53 -0700
To: bug-Pod-Webserver [...] rt.cpan.org
From: Allison Randal <allison [...] perl.org>
Thanks for tracking it down, I hadn't had time to look at it yet. Yeah, looks like the module needs a couple more command-line options (set timeout, and no timeout). I have a few other patches to apply, so I'll plan to work on a new release this weekend. Thanks, Allison
I went through almost exactly the same train of "WTF" as Ivor did. I'd start up the podwebserver, use it and then find it mysteriously gone the next day. A server which shuts itself down after a certain period of time is very surprising. I can't think of anything else which works that way. select() is a quiescent function and any decent OS should swap out the memory of an idle server. If I want something that shuts down when its not in use I'll use inetd. Please just change the default to not timeout.
Fixed in V 3.06. V 3.07 is on CPAN. Thanx for the report.