1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

1345 Commits

Author SHA1 Message Date
Brian Pane
4778e1e0de When computing the timeouts for keepalives and write completion,
get the current time _after_ processing the event that led to the
timeout, rather than before.
[forward-port of commit 349189 from the async-read-dev branch]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@349190 13f79535-47bb-0310-9956-ffa450edef68
2005-11-27 07:34:15 +00:00
Brian Pane
58d941233a remove an obsolete comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345726 13f79535-47bb-0310-9956-ffa450edef68
2005-11-20 07:40:49 +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
Brian Pane
596e8e2d9d Minor refactoring: move the creation of the pollset and associated
data structures outside of the listener thread function.  The point
of this is to facilitate future experiments with different concurrency
models like Leader/Followers as potential alternatives to the current
Reactor design.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332879 13f79535-47bb-0310-9956-ffa450edef68
2005-11-13 02:27:44 +00:00
Jim Jagielski
b72e610410 No functional change: more indenting/formatting changes due to
tabbing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332316 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 16:03:23 +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
Brian Pane
cb0e5db86f Async write completion for Event MPM
(backported from async-dev branch to 2.3 trunk)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@327945 13f79535-47bb-0310-9956-ffa450edef68
2005-10-24 03:33:14 +00:00
Greg Ames
a5d8311d59 remove the recycled_pool variable to keep it more in sync with worker.
event already had logic in the listener thread error legs to prevent
leaking ptrans, so this is mostly cosmetic.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307250 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 03:47:15 +00:00
Greg Ames
12223605b7 remove obsolete constant
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307239 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 02:29:08 +00:00
Jeff Trawick
ee3ff1a4a0 use Greg's cleaner fix for CAN-2005-2970
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@307221 13f79535-47bb-0310-9956-ffa450edef68
2005-10-08 00:10:02 +00:00
Colm MacCarthaigh
e92e109916 Remove some trailing spaces. Syncs with 2.2.x.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293307 13f79535-47bb-0310-9956-ffa450edef68
2005-10-03 11:09:15 +00:00
Jeff Trawick
a755909804 SECURITY: CAN-2005-2970 (cve.mitre.org)
worker MPM: Fix a memory leak which can occur after an aborted
connection in some limited circumstances.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@292809 13f79535-47bb-0310-9956-ffa450edef68
2005-09-30 16:34:25 +00:00
Joe Orton
0fb1643049 * server/mpm/prefork/prefork.c: Add volatile qualifier to die_now
since it is changed by a signal handler.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@290124 13f79535-47bb-0310-9956-ffa450edef68
2005-09-19 11:54:52 +00:00
Greg Ames
5b981cc853 get rid of an obsolete comment. the separate event thread disappeared when
the event MPM moved into svn.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@289681 13f79535-47bb-0310-9956-ffa450edef68
2005-09-17 01:14:16 +00:00
Paul Querna
d9219348b2 Move the timeout mutex up, to limit the time we are holding it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@279794 13f79535-47bb-0310-9956-ffa450edef68
2005-09-09 15:24:43 +00:00
Colm MacCarthaigh
cc841a28e5 Initiliase all of the first_*_limit variables to zero, so that we can actually
raise limits beyond their defaults reliably. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265523 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:10:55 +00:00
Colm MacCarthaigh
106fdaa568 Revert one part. I should have tested seperately. This line isn't neccessary.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265519 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:04:25 +00:00
Colm MacCarthaigh
cef7ca9fe6 Actually allow the admin to set thread_limit higher than the default.
Also, initialise the first_ variables, since they are tested in the
set_ functions.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265518 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 16:01:13 +00:00
Jim Jagielski
d81de0d9b3 Add ap_append_pid(); This is performed enough to warrant
a function I think, especially with the fact that
the mapping of getpid() to APR_PID_T_FMT isn't
consistant in some areas. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265506 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:22:08 +00:00
Jim Jagielski
1df26ab1bb More getpid format fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265504 13f79535-47bb-0310-9956-ffa450edef68
2005-08-31 15:18:54 +00:00
Colm MacCarthaigh
146fd39a5a Implement graceful stop in the event MPM. Implementation is identical to
the worker MPM implementation. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264105 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 10:20:25 +00:00
Colm MacCarthaigh
36b3643d82 *how* did I mis-spell that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264104 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 09:38:33 +00:00
Colm MacCarthaigh
5a0531c52e Move the "GracefulShutdownTimeout" command definition into mpm_common
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@264103 13f79535-47bb-0310-9956-ffa450edef68
2005-08-29 09:28:27 +00:00
Ian Holsman
8c1e315d3f Doxygen fixup / cleanup
submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
2005-08-28 23:03:59 +00:00
Colm MacCarthaigh
fec621ccba Implement a graceful-stop for the worker MPM. We close our listeners, and then
ask each child process to do the same. We then monitor until all children have
exited.

The change to ap_start_shutdown(void) to ap_start_shutdown(int) may look like
an external API change, but the function is defined static, and used only in
one place.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@241819 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 23:22:50 +00:00
Colm MacCarthaigh
b4b88ed365 Re-add a simple, obvious, speed-up.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@241814 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 23:04:17 +00:00
Colm MacCarthaigh
04558bec28 Remove as many ghastly scoreboard loops from the graceful-shutdown code, and
replace with the new ap_relieve_child_processes() call. Add a sleep() call now,
as we lost the timeout inherent in ap_wait_or_timeout(). 1 second seems a sane
choice.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240466 13f79535-47bb-0310-9956-ffa450edef68
2005-08-27 22:16:46 +00:00
Colm MacCarthaigh
d7c04b158c Move the "GracefulShutdownTimeout" directive into mpm_common, for re-use
with other MPM's.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240296 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 17:43:24 +00:00
Colm MacCarthaigh
c6fb6c57d0 Implement a "graceful-stop" for the prefork MPM (might aswell do the hard one
first). 

General approach is to send SIGUSR1 to all children (which will de-listen, and
exit when finished), and to gather all children as they exit. 

We don't use a sleep(timeout) for the timeout implementation, because this
would lead to a rut of defunct children until the timeout had expired.

set_graceful_shutdown stolen from Ken Coar. See <3E84B1EC.3050007@Golux.Com>
(28 Mar 2003).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@240270 13f79535-47bb-0310-9956-ffa450edef68
2005-08-26 16:09:54 +00:00
Colm MacCarthaigh
cdb2935300 Implement "de-listening" in the worker MPM. Fixes PR28167. Comments in CHANGES
file also cover r239710-1. 



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239740 13f79535-47bb-0310-9956-ffa450edef68
2005-08-24 19:37:46 +00:00
Colm MacCarthaigh
aacf3609d2 Implement "de-listening" for graceful restarts with the prefork MPM. With this
change;

  1.) httpd -k graceful sends SIGUSR1 to the parent pid, which in turn
      sends SIGUSR1 to all of the active children,

  2.) Active children each close their copy of listener fd's.

This means that the listening sockets are freed for re-use. In the ordinary
case, this makes no difference. However if for example admin changes "Listen
80" to "Listen 81" in the config, this rev makes port 80 immediately available
(no waiting for the graceful children to die).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239711 13f79535-47bb-0310-9956-ffa450edef68
2005-08-24 16:58:11 +00:00
Colm MacCarthaigh
395896ae8d Remove support for the threaded-mpm's on Linux 2.0, and de-autoconf the
graceful restart signal. Frees up SIGWINCH for implementing graceful stop.
See <20050727114058.GA3390@stdlib.net> and subsequent thread on httpd-dev.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239430 13f79535-47bb-0310-9956-ffa450edef68
2005-08-23 16:41:17 +00:00
Paul Querna
e1955172ab * event.c: Create ptrans pool as a child of pconf, to fix APR pool
lifetime checks in apr_tables.c.

Based on r170896 changes to the Worker MPM.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179355 13f79535-47bb-0310-9956-ffa450edef68
2005-06-01 05:00:29 +00:00
Jeff Trawick
002ca1448b downgrade the log level of a proc_mutex_unlock error message
when it occurs during restart; it isn't at all uncommon then
when SysV semaphores are used for the accept mutex

same logic already in place for two other mutex calls


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179317 13f79535-47bb-0310-9956-ffa450edef68
2005-05-31 23:57:41 +00:00
Joe Orton
9d9b45ae5c * server/mpm/worker/worker.c (listener_thread): Create ptrans pool as
a child of pconf, to fix APR pool lifetime checks in apr_tables.c.

Submitted by: Joe Schaefer


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170896 13f79535-47bb-0310-9956-ffa450edef68
2005-05-19 09:01:22 +00:00
Greg Ames
e06eaebac5 missed a couple.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@168649 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 20:37:05 +00:00
Paul Querna
3bce42b631 Remove this old email from the source tree.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@168496 13f79535-47bb-0310-9956-ffa450edef68
2005-05-06 02:26:26 +00:00
Greg Ames
5ceb57af0d worker and event mpms: transient thread creation errors shouldn't take down
the whole server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@168182 13f79535-47bb-0310-9956-ffa450edef68
2005-05-04 20:00:23 +00:00
Bradley Nicholes
6905d3d9d5 Allow httpd on NetWare to build using either the standard socket libraries or the Winsock libraries.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@161368 13f79535-47bb-0310-9956-ffa450edef68
2005-04-14 23:42:21 +00:00
Greg Ames
20b9c89da5 the style police have been sleeping
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160211 13f79535-47bb-0310-9956-ffa450edef68
2005-04-05 19:45:32 +00:00
Bill Stoddard
7936e9161a Win32: Eliminate useless debug error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@160209 13f79535-47bb-0310-9956-ffa450edef68
2005-04-05 19:01:09 +00:00
Allan K. Edwards
e807f6b3c3 Fix Windows CompContext buff size miscalculation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@158685 13f79535-47bb-0310-9956-ffa450edef68
2005-03-22 21:50:54 +00:00
Paul Querna
1fe9d2eba8 sync with mod_status hacks in the worker mpm.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157810 13f79535-47bb-0310-9956-ffa450edef68
2005-03-16 21:48:57 +00:00
Paul Querna
49ff90cbe3 Add ap_mpm_is_experimental and ap_mpm_is_threaded. Use these instead of checking for specific MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156574 13f79535-47bb-0310-9956-ffa450edef68
2005-03-08 22:40:33 +00:00
Bradley Nicholes
bb35e2f831 Make sure that the secure listen sockets that are created and injected into the ap_listeners lists by mod_nw_ssl are handled correctly so that they remain open and reused across restarts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156556 13f79535-47bb-0310-9956-ffa450edef68
2005-03-08 18:09:43 +00:00
Jeff Trawick
3e14f16867 worker MPM/mod_status: Support per-worker tracking of pid and
generation in the scoreboard so that mod_status can accurately
represent workers in processes which are gracefully terminating.

New child processes with worker MPM can take over slots of
individual threads within gracefully terminating processes.
Sometimes this is a problem (too many of these gracefully
terminating processes), so it is helpful to have mod_status
provide the information required to recognize these processes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156274 13f79535-47bb-0310-9956-ffa450edef68
2005-03-05 20:06:55 +00:00
Bill Stoddard
8af9f738b1 Win32: Init the args to mpm_service_install(). Prevents nasty things like segfaults
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@155833 13f79535-47bb-0310-9956-ffa450edef68
2005-03-01 22:38:04 +00:00
Bill Stoddard
14aff882b6 Win32: output some useful debug messages when installing the service
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154322 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 17:05:29 +00:00
Bill Stoddard
5590c522d6 Win32: Move call of mpm_service_install to rewrite_args hook but continue thru post_config to check httpd.conf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154319 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 16:31:06 +00:00