Project

General

Profile

Actions

Feature #2824

closed

inetd/wait mode with auto-shutdown after idle timeout

Added by Guenther_Brunthaler over 7 years ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Low
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

I would like to be able to run lighttpd as an inetd/wait service, serving not just one (like option -1) but multiple requests from stdin. And it should terminate after being idle for some time.

In other words, I would like to see the combination of the already-existing -1 and -i options.

Consider the advantages: Infrequently used Web services in resource-restricted environments could launch lighttpd as a "wait"-service via inetd, just like option -1 already does.

But unlike -1, the new mode would serve any number of requests, making lighttpd run as efficient as a normal daemon, except for the startup time for the very first request.

Admittedly, systemd's socket activation could already be used today to implement this.

But what systemd cannot do, and generally sucks at, is stopping auto activated services once they are no longer used. It only ever automatically starts things, never stops them.

This is why the combination with an idle timeout value would be so helpful: After the initial launch via inetd, lighttpd could serve requests for minutes or hours even, not just for fractions of seconds / single requests.

Nevertheless, as soon as no-one has been accessing the web service any more for some time (perhaps at night?), lighttpd would shut down gracefully and automatically, releasing any resources, until inetd starts it again once the next period of activity starts.

In addition to the obvious advantages like resource savings during the time it is not running, this new mode would also help to alleviate memory leaks that are said to plague long-running lighttpd services in some situations. Because every time lighttpd (and its associated fcgi-processes) shut down, the whole process group has terminated and any leaks are gone as well.

I also hope it would not be too difficult to implement this new feature: The required basic building blocks (-i and -1 options) already exist; they only needed to be combined in a new way.

#2

Updated by gstrauss over 7 years ago

  • Priority changed from Normal to Low
  • Target version deleted (1.4.x)
#12

Updated by gstrauss over 7 years ago

  • Status changed from New to Missing Feedback
  • Target version set to 1.4.46
#18

Updated by gstrauss over 1 year ago

  • ASK QUESTIONS IN Forums set to No
#19

Updated by gstrauss over 1 year ago

  • Status changed from Missing Feedback to Fixed
  • Target version deleted (1.4.46)
Actions

Also available in: Atom