1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

61 Commits

Author SHA1 Message Date
Yann Ylavic
a870a54130 mpm_event,worker}: Really perform_idle_server_maintenance() per bucket.
mpm_{event,worker}: No need to pass num_buckets to perform_idle_server_maintenance() and server_main_loop().

mpm_worker: the last used scoreboard slot depends on pid != 0 only.

Align max_daemons_limit value on all MPMs.

That's the number of scoreboard slots in use, so it shouldn't be negative.
Fix off by one in OS/2 too.

Submitted by: ylavic <ylavic.dev@gmail.com>

Github: closes #274


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894291 13f79535-47bb-0310-9956-ffa450edef68
2021-10-15 13:22:11 +00:00
Mike Rumph
85760859ca Fix spelling errors found by codespell. [skip ci]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1873985 13f79535-47bb-0310-9956-ffa450edef68
2020-02-13 18:15:57 +00:00
Yann Ylavic
9ed858cd50 mpms: follow up to r1629925: more error reports.
Failing to setup (or no) listeners is also an error.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1733173 13f79535-47bb-0310-9956-ffa450edef68
2016-03-01 22:29:50 +00:00
Rainer Jung
fad21a6dbc Join multi-line MPM startup log messages into
single long lines.

Followup to r1725394 and r1725548.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1731929 13f79535-47bb-0310-9956-ffa450edef68
2016-02-23 19:03:00 +00:00
Rainer Jung
496a614645 Added many log numbers to log statements that
had none.

Handled all files in server/mpm/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725394 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:20:55 +00:00
Rich Bowen
29603b5fe3 s/a a/a/g
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690122 13f79535-47bb-0310-9956-ffa450edef68
2015-07-09 16:07:25 +00:00
Yann Ylavic
d2bec9df64 core: ensure that MPMs return an error on runtime failure and hence that
httpd's main process also exits with an error.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629925 13f79535-47bb-0310-9956-ffa450edef68
2014-10-07 16:54:31 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
6d8de2ff42 Rename MaxClients to MaxRequestWorkers which describes more accurately what
it does.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137744 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:00:52 +00:00
Jeff Trawick
573a235d3b the mpm-note-child-killed hook is just for state sync between
ap_{reclaim,relieve}_child_processes() and their callers

the NetWare and OS/2 MPMs don't use that


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086948 13f79535-47bb-0310-9956-ffa450edef68
2011-03-30 13:32:21 +00:00
Jeff Trawick
5e3ba7d3ee mpm_common.c implements a handful of config directives; the
related state has to be re-initialized to the default values
at pre-config time, but that was handled inconsistently by
the MPMs, resulting in unexpected behavior when some of the
directives were removed across restart

move that necessary initialization from the MPMs to common 
code run from core's pre-config; MPMs that need to override
defaults can do so by running after core's pre-config (the 
NetWare MPM now does that)

the DEFAULT_MAX_REQUESTS_PER_CHILD compile setting wasn't useful
enough to keep

the simple MPM wasn't consistent in which of these directives
were respected and which weren't, and that hasn't changed
(see procmgr.max_requests_per_child vs. ap_max_requests_per_child)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086293 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 16:25:20 +00:00
Jeff Trawick
044e80c621 ap_max_requests_per_child is a global
(otherwise, this local one doesn't match the one used by the OS/2 child
code or the MaxConnectionsPerChild directive)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086246 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 14:13:37 +00:00
Jeff Trawick
7be2d26631 consolidate logic to remove the pidfile in a new API,
ap_remove_pid(), related to existing ap_log_pid() and
ap_read_pid()

presumably this is useful to third-party MPMs as well


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086224 13f79535-47bb-0310-9956-ffa450edef68
2011-03-28 13:35:08 +00:00
Brian Havard
c07640c285 Remove definition of ap_pid_fname from OS/2 MPM. It's now in mpm_common.c.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@956815 13f79535-47bb-0310-9956-ffa450edef68
2010-06-22 08:48:29 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
Jeff Trawick
01026cbc46 remove dead code related to the accept mutex
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882943 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 17:18:39 +00:00
Brian Havard
392910c73c Brind OS/2 MPM up to date with current API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832409 13f79535-47bb-0310-9956-ffa450edef68
2009-11-03 13:29:31 +00:00
Brian Havard
b975e90af4 Bring OS/2 MPM back from the dead.
Reverses r758899.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@804678 13f79535-47bb-0310-9956-ffa450edef68
2009-08-16 12:03:34 +00:00
Jeff Trawick
e64b014d3e remove OS/2 MPM
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758899 13f79535-47bb-0310-9956-ffa450edef68
2009-03-26 22:35:11 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Paul Querna
5fa2bbbdeb Remove ap_graceful_stop_signalled from all MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645437 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:00:32 +00:00
Joe Orton
ada9c28dcf Revert r547987 ("svn merge -c -547987 .")
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@551835 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 09:31:11 +00:00
Jim Jagielski
86f602beb2 PID table impl: parent process keeps a local table store of
Apache child process PIDs and uses that to check validity
of what's in the scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@547987 13f79535-47bb-0310-9956-ffa450edef68
2007-06-16 21:29:24 +00:00
Jeff Trawick
743a621e8d Replace ap_get_server_version with ap_get_server_banner() and
ap_get_server_description().

High-level summary:

The full server version information is now included in the error log at
startup as well as server status reports, irrespective of the setting
of the ServerTokens directive.

Third-party modules must now use ap_get_server_banner() or 
ap_get_server_description() in place of ap_get_server_version().



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 13:08:15 +00:00
Chris Darroch
e69f467709 Introduce a check_config phase between pre_config and open_logs,
to allow modules to review interdependent configuration directive
values and adjust them while messages can still be logged to the
console.

The open_logs phase is already used somewhat for this purpose by
certain MPMs (winnt, prefork, worker, and event) but only by forcing
their functions ahead of the core ap_open_logs() function, and
since this phase runs after the ap_signal_server function during startup,
it can not be used to generate messages on the console when restarting.

Add the check_config phase to mod_info and mod_example.

Handle relevant MPM directives during this phase and format messages
for both the console and the error log, as appropriate.  Bounds and sanity
checks on the values of the MPM directives are handled in sequence in
this phase instead of in the various directive handling functions, since
those functions (e.g., set_max_clients()) may not be called at all if their
directives do not appear in the configuration files, and even if they
are called, there is no guarantee that this will occur in any particular
order.

Remove from the worker and event MPMs the code in the pre_config phase
that alters the configuration node tree by re-ordering ThreadsPerChild
ahead of MaxClients.  This code is effective but insufficient; for
example, if ServerLimit follows MaxClients, the test against server_limit
in set_max_clients() is invalid.  (In practice, this only results in
incorrect or absent warnings on the console, because server_limit is
set to its configured value when the main loop re-runs the configuration
process.)

Prevent ap_threads_per_child from exceeding thread_limit in the
winnt, worker, and event MPMs.  This situation could occur if
ThreadsPerChild was not specified in the configuration files and
ThreadLimit was set to a value smaller than DEFAULT_THREADS_PER_CHILD,
because set_threads_per_child() would never be called and therefore
its bounds check against thread_limit would not be performed.

Remove from the winnt, prefork, worker, and event MPMs the
changed_limit_at_restart flag.  Set the first_server_limit and
first_thread_limit values during the first execution of the check_config
function, and use them to detect changes to ServerLimit and ThreadLimit
across restarts and issue appropriately formatted warnings.  Remove the
comments about the error log being a "bit bucket"; this was true when
the code was originally committed in r92530 but that was due to a bug
fixed in r92769.

Be consistent about setting all MPM configuration directive values in the
pre_config phase.

Rephrase and reformat the console and log file messages relating to
MPM configuration directives to be consistent across all MPMs.  Use
briefer messages when logging to the error log than to the console.

Update miscellaneous stale comments and messages (e.g., reference to
daemons_min_free in worker and event MPMs, "prefork open_logs" in
winnt MPM, and StartServers in netware MPM).

The winnt, netware, beos, and mpmt_os2 MPMs should be tested by developers
with access to those platforms, especially the winnt MPM, which has
unique logic with respect to distinguishing between parent and child
processes during the configuration phases.

Update the English documentation for the worker MPM's ThreadsPerChild
directive, which no longer needs to precede other MPM directives in the
configuration files if it has a non-default value.  The German (.de) and
Japanese (.ja) translations should be updated by developers fluent in
those languages.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@431460 13f79535-47bb-0310-9956-ffa450edef68
2006-08-14 22:55:45 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Jim Jagielski
08c97ba290 No functional change: remove "internal" tab spacing/formatting.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345053 13f79535-47bb-0310-9956-ffa450edef68
2005-11-16 16:31:25 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Jim Jagielski
5d2fae4818 No functional change: simple detabbing of indented code.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:05:51 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
André Malo
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
André Malo
db7e0166ec fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102583 13f79535-47bb-0310-9956-ffa450edef68
2004-02-08 13:41:23 +00:00
André Malo
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
André Malo
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
Jeff Trawick
aa21671e13 switch to APR 1.0 API (which is still in flux)
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
2003-09-03 19:27:12 +00:00
Bradley Nicholes
dc4cfa1640 Make sure that the global ap_max_mem_free is initialized along with the
other MPM globals whenever HTTPD is started or restarted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
2003-08-27 22:33:12 +00:00
André Malo
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
Brian Havard
10aeb0a40c Don't catch more than 1 SIGTERM in the parent process as doing so results
in an unkillable process if shutdown_pending doesn't manage to trigger
process exit.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96349 13f79535-47bb-0310-9956-ffa450edef68
2002-08-11 04:40:59 +00:00
Jim Jagielski
cb3975a65b Now that we have the functionality in apr, we can now have 2.0's
startup message regarding AcceptMutex (what we are using and what
the default is) "fully" match what is present in 1.3.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95568 13f79535-47bb-0310-9956-ffa450edef68
2002-06-07 14:08:05 +00:00
Jeff Trawick
c871b41d3c stop using APLOG_NOERRNO in calls to ap_log_?error()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
2002-05-17 11:11:39 +00:00
Brian Havard
d54a593253 Get local address info in listener sockets initialized when constructed in
the child process from a descriptor passed from the parent. This fixed vhost
address matching.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94642 13f79535-47bb-0310-9956-ffa450edef68
2002-04-14 08:38:15 +00:00
Jim Jagielski
730e99e461 Fold the compiled-in knowledge of the allowable AcceptMutex settings into
its help entry. Requires the use of a extern string rather than a function
call for the initialization to be valid in the macro (Thx to Jeff!).
In the meantime, bump down the error logging until we deal with true
default and configured setting information ala 1.3.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94062 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 22:19:11 +00:00
Jim Jagielski
a65170a84c Bring 2.0 up to parity, a bit, with how much info we provide to
the admin regarding valid values for AcceptMutex. Should also
tell 'em what "default" actually maps to, but that can wait.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94055 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 16:44:13 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Jeff Trawick
53d837b39b simplify the way we find the family of an apr_sockaddr_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93884 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 23:15:54 +00:00
Brian Havard
6e86e9a563 Handle shift of restart_time into scoreboard.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93547 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 11:25:57 +00:00
Aaron Bannert
d5fdaf9cfd The pre_config hook now takes a return value. This allows modules to
cause the server to bail out under error conditions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93063 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 23:49:40 +00:00
Brian Havard
5e35f192f3 Get OS/2 MPM working again after last scoreboard changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92808 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 15:09:18 +00:00
William A. Rowe Jr
7e1113f913 This patch eliminated from the _SHARED_ segment of the scoreboard all
pointer math.  This is required for portable scoreboards.

  vhost becomes the 'vhost name string' so it now survives ap_generation
  clicks.  next was apparently never used.

  This patch also accounts for the changes to the apr_shm api, and gives
  Win32 the magic of a shared scoreboard.

  Breakage aplenty on non-win32 platforms, I suspect, but this radical
  surgery, and culling of unused functions, was really, really needed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92791 13f79535-47bb-0310-9956-ffa450edef68
2002-01-10 00:28:00 +00:00