History log of /lighttpd1.4/src/network.h (Results 1 – 10 of 10)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: lighttpd-1.4.69, lighttpd-1.4.68, lighttpd-1.4.67, lighttpd-1.4.66, lighttpd-1.4.65, lighttpd-1.4.64, lighttpd-1.4.63, lighttpd-1.4.62, lighttpd-1.4.61, lighttpd-1.4.60, lighttpd-1.4.59, lighttpd-1.4.58, lighttpd-1.4.57, lighttpd-1.4.56, lighttpd-1.4.56-rc7, lighttpd-1.4.56-rc6, lighttpd-1.4.56-rc5, lighttpd-1.4.56-rc4, lighttpd-1.4.56-rc3, lighttpd-1.4.56-rc2, lighttpd-1.4.56-rc1
# 352d5d77 25-Sep-2020 Glenn Strauss <[email protected]>

[core] graceful and immediate restart option

graceful and (nearly) immediate lighttpd restart option

For *some* configurations, it *may* be safe to background the current
lighttpd server (or worker

[core] graceful and immediate restart option

graceful and (nearly) immediate lighttpd restart option

For *some* configurations, it *may* be safe to background the current
lighttpd server (or workers) to continue processing active requests
and, in parallel, to start up a new lighttpd server with a new
configuration. For other configurations, doing so might not be safe!

Therefore, this option must be explicitly configured to enable:
server.feature-flags += ("server.graceful-restart-bg" => "enable")
server.systemd-socket-activation = "enable"

Along with enabling server.feature-flags "server.graceful-restart-bg",
enabling server.systemd-socket-activation allows transfer of open
listening sockets to the new lighttpd server instance, and occurs
without closing the listening sockets and without destroying the
kernel listen backlog queue on the socket.

Safe configurations may include lighttpd.conf which connect to
standalone backend daemons, e.g. proxying to other servers,
including PHP-FPM backends.

Unsafe configurations include lighttpd.conf which use "bin-path" option
in *.server configs, instructing lighttpd to execute the backends.
Using the graceful-and-immediate-restart option is likely *unsafe* if
the backend daemon expects only one instance of itself to run at a time.

Current implementation of graceful and immediate restart option keeps
the backgrounded lighttpd in the same process group, so that subsequent
SIGINT or SIGTERM will shut down both the new and the backgrounded
servers. (An alternative option (commented out in the code) is to
background and detach from the new lighttpd process.) Regardless,
existing subprocesses, such as CGI, remain in original process group.
As a result, the new lighttpd server may receive SIGCHLD for unknown
processes inherited from the old server, which the new lighttpd server
will reap and discard. The original lighttpd server, now a child, will
be unable to detect exit or reap and report status on those pre-existing
subprocesses.

Graceful restart is triggered in lighttpd by sending lighttpd SIGUSR1.
If lighttpd is configured with workers, then SIGINT (not SIGUSR1) is
sent to the process group, including other processes started by
lighttpd, e.g. CGI. To work well with graceful restart, CGI scripts and
other processes should trap SIGINT (and SIGUSR1 for good measure).
Long-running scripts may want to checkpoint and close, e.g. a CGI script
implementing a long-running websocket connection.

show more ...


Revision tags: lighttpd-1.4.55, lighttpd-1.4.54
# fb9b8ad8 04-Feb-2019 Glenn Strauss <[email protected]>

[core] mark startup/shutdown funcs cold


Revision tags: lighttpd-1.4.53, lighttpd-1.4.52, lighttpd-1.4.51, lighttpd-1.4.50
# 04d76e7a 25-Mar-2018 Glenn Strauss <[email protected]>

[core] some header cleanup

provide standard types in first.h instead of base.h
provide lighttpd types in base_decls.h instead of settings.h
reduce headers exposed by headers for core data structures

[core] some header cleanup

provide standard types in first.h instead of base.h
provide lighttpd types in base_decls.h instead of settings.h
reduce headers exposed by headers for core data structures
do not expose <pcre.h> or <stdlib.h> in headers
move stat_cache_entry to stat_cache.h
reduce use of "server.h" and "base.h" in headers

show more ...


Revision tags: lighttpd-1.4.49, lighttpd-1.4.48, lighttpd-1.4.47, lighttpd-1.4.46
# 5c25f629 08-Oct-2017 Glenn Strauss <[email protected]>

[core] /dev/stdin listener for inetd wait yes

server.bind = "/dev/stdin" for use with inetd wait yes

(experimental)

x-ref:
"inetd/wait mode with auto-shutdown after idle timeout"
https://redmi

[core] /dev/stdin listener for inetd wait yes

server.bind = "/dev/stdin" for use with inetd wait yes

(experimental)

x-ref:
"inetd/wait mode with auto-shutdown after idle timeout"
https://redmine.lighttpd.net/issues/2824

show more ...


# 6c1e6e66 24-Jan-2017 Glenn Strauss <[email protected]>

[core] graceful restart with SIGUSR1 (fixes #2785)

more consistent cleanup of resources at shutdown
(e.g. upon error conditions)

Notes: graceful restart with SIGUSR1
- not available if chroot()ed,

[core] graceful restart with SIGUSR1 (fixes #2785)

more consistent cleanup of resources at shutdown
(e.g. upon error conditions)

Notes: graceful restart with SIGUSR1
- not available if chroot()ed, oneshot mode, or if idle timeout occurs
- preserve process id (pid)
- preserve existing listen sockets
- i.e. does not close old listen sockets from prior configs
(even if old listen sockets no longer in the new config)
(sockets may have been bound w/ root privileges no longer available)
- will fail to add listen sockets from new config if privileges
lighttpd configured to drop privileges to non-root user, and
new listen socket attempts to bind to low-numbered port requiring
root privileges.
- will fail if listen sockets in new config conflict with any previous
old listen sockets
- These failure modes will result in lighttpd shutting down instead of
graceful restart. These failure modes are not detectable with
preflight checks ('lighttpd -tt -f lighttpd.conf') because the
new instance of lighttpd running the preflight check does not
known config state of n prior graceful restarts, or even the
config state of the currently running lighttpd server.
- due to lighttpd feature of optionally managing backends
(e.g. fastcgi and scgi via "bin-path"), lighttpd must wait for
all child processes to exit prior to restarting. Restarting new
workers while old workers (and old backends) were still running would
result in failure of restarted lighttpd process to be able to bind to
sockets already in use by old backends (e.g. unix "socket" path)

x-ref:
"graceful restart with SIGUSR1"
https://redmine.lighttpd.net/issues/2785

show more ...


Revision tags: lighttpd-1.4.45
# 82feb705 24-Dec-2016 Glenn Strauss <[email protected]>

[core] move con throttling to connections-glue.c

move write throttling code from network.c:network_write_chunkqueue()
to connections-glue.c:connection_write_chunkqueue() and fix the code
to use TCP_

[core] move con throttling to connections-glue.c

move write throttling code from network.c:network_write_chunkqueue()
to connections-glue.c:connection_write_chunkqueue() and fix the code
to use TCP_CORK only on TCP sockets.

show more ...


Revision tags: lighttpd-1.4.44, lighttpd-1.4.43, lighttpd-1.4.42, lighttpd-1.4.41, lighttpd-1.4.40
# 416b5729 30-Jun-2016 Glenn Strauss <[email protected]>

[core] disable Nagle algorithm (TCP_NODELAY)

disable Nagle algorithm (TCP_NODELAY) on client sockets


# 8abd06a7 19-Mar-2016 Glenn Strauss <[email protected]>

consistent inclusion of config.h at top of files (fixes #2073)

From: Glenn Strauss <[email protected]>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-03

consistent inclusion of config.h at top of files (fixes #2073)

From: Glenn Strauss <[email protected]>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-0310-8abb-c4023f1b3aa9

show more ...


Revision tags: lighttpd-1.4.39, lighttpd-1.4.38, lighttpd-1.4.37, lighttpd-1.4.36, lighttpd-1.4.36--rc1, lighttpd-1.4.35, lighttpd-1.4.34, lighttpd-1.4.33, lighttpd-1.4.32, lighttpd-1.4.31, lighttpd-1.4.30
# f434d514 22-Aug-2011 Stefan Bühler <[email protected]>

Limit amount of bytes we send in one go; fixes stalling in one connection and timeouts on slow systems.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2801 152afb58-edef-0310-8a

Limit amount of bytes we send in one go; fixes stalling in one connection and timeouts on slow systems.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2801 152afb58-edef-0310-8abb-c4023f1b3aa9

show more ...


Revision tags: lighttpd-1.4.29, lighttpd-1.4.28, lighttpd-1.4.27, lighttpd-1.4.26, lighttpd-1.4.25, lighttpd-1.4.24, lighttpd-1.4.23, lighttpd-1.4.22, lighttpd-1.4.21, lighttpd-1.4.20, lighttpd-1.4.19, lighttpd-1.4.18, lighttpd-1.4.17, lighttpd-1.4.16, lighttpd-1.4.15, lighttpd-1.4.14, lighttpd-1.4.13, lighttpd-1.4.12, lighttpd-1.4.11, lighttpd-1.4.10, lighttpd-1.4.9, lighttpd-1.4.8, lighttpd-1.4.7, lighttpd-1.4.6, lighttpd-1.4.5, lighttpd-1.4.4, lighttpd-1.4.3, lighttpd-1.4.2, lighttpd-1.4.1, lighttpd-1.3.16, lighttpd-1.3.15, lighttpd-1.3.14, lighttpd-1.3.13, lighttpd-1.3.12, lighttpd-1.3.11
# bcdc6a3b 20-Feb-2005 Jan Kneschke <[email protected]>

moved everything below trunk/ and added branches/ and tags/


git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@30 152afb58-edef-0310-8abb-c4023f1b3aa9