1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

44 Commits

Author SHA1 Message Date
Paul J. Reder
78ae2a9eb4 PR:
Obtained from:
Submitted by:	Paul J. Reder
Reviewed by:

Remove the MPM_SYNC_CHILD_TABLE macro since there is no longer a scoreboard
file that needs to be synched.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94308 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 16:15:33 +00:00
Jim Jagielski
70bb2575ea The old, legacy (and unused) code in which the scoreboard was totally
and completely contained in a file (SCOREBOARD_FILE) has been
removed. This does not affect scoreboards which are *mapped* to
files using named-shared-memory at all. This implies that scoreboards
must be based, at some level, on native shared memory (mmap, shm_open,
shmget, whatever), but the code has assumed that for quite awhile
now. Having the scoreboard be *based* on a file makes no sense today.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94306 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 14:33:50 +00:00
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +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
William A. Rowe Jr
cec6d4b870 The pre_mpm hook creates server-lifetime objects (or at least, for the
generations across graceful restarts.)  They should use the process pool.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94039 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 05:58:21 +00:00
Sander Striker
50ba0ce732 Update the mpms to call the new allocator/pools API
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93943 13f79535-47bb-0310-9956-ffa450edef68
2002-03-15 00:50:31 +00:00
Bradley Nicholes
da65586a94 Added code to extract the current address space name so that each
instance of Apache can be identified by the address space that it is running in


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93934 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 16:48:19 +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
Aaron Bannert
0cff6e8f58 Implement new ScoreBoardFile directive logic. This affects how we
create the scoreboard's shared memory segment. We now have the best of
both worlds:

if config specifies ScoreBoardFile
  create name-based shared memory, errors are fatal
else /* we get to choose */
  create anonymous shared memory
  if ENOTIMPL
    create name-based shared memory from DEFAULT_SCOREBOARD
  else
    errors are fatal

This gives us the flexibility to have anonymous shared memory (on platforms
that support it) as well as name-based shared memory when third-party
programs want access to our scoreboard.

The ap_scoreboard_fname static variable is now owned by the scoreboard.c
file, and no longer by the MPMs. The MPMs MUST NOT set ap_scoreboard_fname
to a default, since that will override the default creation logic and
only allow name-based segments.

Submitted by:	Aaron Bannert
Reviewed by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93434 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 20:48:19 +00:00
Bradley Nicholes
de40d0256c Create a new pool allocator for each worker thread
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93397 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 22:56:10 +00:00
Bradley Nicholes
6e81b18307 Implemented the handling of the SIGABRT signal.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93315 13f79535-47bb-0310-9956-ffa450edef68
2002-02-06 21:13:57 +00:00
Bill Stoddard
bd3d360392 Reintroduce the create_connection hook. This hook is required to enable
modules to completely take over all network i/o from the core.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93171 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 22:16:31 +00:00
Bradley Nicholes
936f36684e Fixed the unload process so that the console command gets properly
unregistered.  This fixes the 88 unreleased resources after termination


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93161 13f79535-47bb-0310-9956-ffa450edef68
2002-02-01 17:29:27 +00:00
Bradley Nicholes
bef023bf1b Removed the call for now to shutdown the listeners so that threads don't end
up stuck on blocking socket calls during shutdown.  I need to figure out a
cleaner way of preventing this problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93139 13f79535-47bb-0310-9956-ffa450edef68
2002-01-31 19:21:34 +00:00
Bill Stoddard
4168820850 This patch restores most of Ryan's patch (11/12/2001) to remove the
client_socket from the conn_rec.  Diffs from Ryan's patch include:

- rename the create_connection hook to install_transport_filters
- move the point of invocation of the hook till after the call to
  after ap_update_vhost_given_ip to enable the hook to use vhost
  config info in its decision making.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93087 13f79535-47bb-0310-9956-ffa450edef68
2002-01-29 19:02:04 +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
Jeff Trawick
7c1ce28ee1 fix the problem where a scoreboard init failure could leave
mod_cgid stranded

a pre_mpm hook can now return failures, so problems in
ap_create_scoreboard percolate back to a place where Apache
can exit cleanly


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93055 13f79535-47bb-0310-9956-ffa450edef68
2002-01-28 00:41:32 +00:00
Bill Stoddard
327e4989d5 Remove the create_connection hook and put the client_socket back into the
conn_rec. The create_connection_hook has a design flaw that prevents it
from making decisions based on vhost information.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93050 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 12:52:08 +00:00
Bradley Nicholes
422b6e7cdf Updated the command line keyword to Apache2 and also modified the
shutdown code for unloading the NLM


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92917 13f79535-47bb-0310-9956-ffa450edef68
2002-01-18 23:26:07 +00:00
Bradley Nicholes
d1146dd589 Implemented a checkunload callback to allow apache to be unloaded using
the Unload console command.  Also changed the nlm name and console
command to APACHE2.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92852 13f79535-47bb-0310-9956-ffa450edef68
2002-01-14 18:55:51 +00:00
Bradley Nicholes
057bd297b4 Combination of blocking and nonblocking accept loop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92832 13f79535-47bb-0310-9956-ffa450edef68
2002-01-11 23:19:45 +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
Bradley Nicholes
f963cb1702 Reworked the accept() loop to avoid an extra call to select() just to
determine if there is work to do.  Made the calls to accept() non-blocking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92737 13f79535-47bb-0310-9956-ffa450edef68
2002-01-04 22:25:09 +00:00
Jeff Trawick
dfaf893a30 for the netware MPM, move HARD_THREAD_LIMIT back to mpm_default.h where
the other user-tunable compile-time parameters are

HARD_SERVER_LIMIT stays in mpm_netware.c since it can't really be changed


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92533 13f79535-47bb-0310-9956-ffa450edef68
2001-12-19 16:23:34 +00:00
Bradley Nicholes
6f67fec86a Reworked the select/accept loop to try to rely less on select to determine
if there is work to do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92532 13f79535-47bb-0310-9956-ffa450edef68
2001-12-19 16:19:00 +00:00
Jeff Trawick
b7e1aa2df1 fix some references to the wrong constant (HARD_SERVER_LIMIT vs.
HARD_THREAD_LIMIT)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92513 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 14:18:28 +00:00
Jeff Trawick
187e9ae3b9 Change core code to allow an MPM to set hard thread/server
limits at startup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92512 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 13:48:54 +00:00
Bradley Nicholes
cab5223a9e Clean up GNU compiler issues on NetWare
Submitted by: Pavel Novy


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92429 13f79535-47bb-0310-9956-ffa450edef68
2001-12-11 19:36:05 +00:00
Bradley Nicholes
d660c328f7 Changed a variable name to avoid a NetWare LibC global conflict.
Submitted by: Pavel Novy [novy@feld.cvut.cz]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92035 13f79535-47bb-0310-9956-ffa450edef68
2001-11-19 16:10:36 +00:00
Ryan Bloom
a4f00625aa Pull lingering close out of the pool cleanup phase. This was causing too
many bugs.  Instead, it is called where it used to be called.  I have
abstracted some of the logic out of the lingering close so that it gets
the socket from the connection using the core's conn_config vector.  This
is in anticipation of a change to use a hook for the lingering close,
which I hope to do soon.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91968 13f79535-47bb-0310-9956-ffa450edef68
2001-11-15 20:49:54 +00:00
Ryan Bloom
695081280d Add the server_rec argument back to the create_connection hook.
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91913 13f79535-47bb-0310-9956-ffa450edef68
2001-11-13 20:29:54 +00:00
Bradley Nicholes
8b8a8f209a Misc. cleanups and performance enhancements
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91908 13f79535-47bb-0310-9956-ffa450edef68
2001-11-13 18:36:22 +00:00
Ryan Bloom
aefc6b1525 Remove commas from the end of the macros that define
directives that are used by MPMs.  Previous to this patch,
you would use these macros without commans, which was unlike
any other directives. Now, after the macro, you must have
a comma.  This makes the macros look more like the rest of the
directives.

I know this is cosmetic, and I was going to leave it alone, but when
I found out that it bothered Cliff too, I decided to fix it after all.

Submitted by:	Ryan Bloom and Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91896 13f79535-47bb-0310-9956-ffa450edef68
2001-11-13 06:04:25 +00:00
Ryan Bloom
26444e2900 Remove more network logic from the MPMs. Essentially, each MPM can define
AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK, which tells Apache to disable_nagle
on the accepted socket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91889 13f79535-47bb-0310-9956-ffa450edef68
2001-11-13 01:24:42 +00:00
Ryan Bloom
0c05b625ac Begin to abstract out the underlying transport layer.
The first step is to remove the socket from the conn_rec,
the server now lives in a context that is passed to the
core's input and output filters. This forces us to be very
careful when adding calls that use the socket directly,
because the socket isn't available in most locations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
2001-11-12 23:49:08 +00:00
Ryan Bloom
13cf9521f5 Remove ap_lingering_close from all of the MPMs. This is now done as
a cleanup registered with the connection_pool.  I have also turned
ap_lingering_close into a static function, because it is only used
in connection.c.  This is the next step to consolidating all of the
socket function calls.  ap_lingering_close will only be added if the
core is dealing with a standard socket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91832 13f79535-47bb-0310-9956-ffa450edef68
2001-11-10 18:26:30 +00:00
Cliff Woolley
4421663d68 Fix the spelling of the AP_MPMQ_MIN_SPARE_DAEMONS and
AP_MPMQ_MAX_REQUESTS_DAEMON macros.  Better to do it now rather than later.

**WARNING** This will of course break the compile on any third-party MPMs
you might have floating around, but it's a really quick change to make.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91777 13f79535-47bb-0310-9956-ffa450edef68
2001-11-07 05:29:58 +00:00
Bradley Nicholes
7b1e9ee08b Adjusted back to microseconds
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91739 13f79535-47bb-0310-9956-ffa450edef68
2001-11-02 23:24:57 +00:00
Bradley Nicholes
a208bee0ca Added the secondary command line hander for manipulating a running
instance of Apache from the console.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91731 13f79535-47bb-0310-9956-ffa450edef68
2001-11-02 18:07:17 +00:00
Bradley Nicholes
fd5a940c96 NetWare MPM cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91692 13f79535-47bb-0310-9956-ffa450edef68
2001-10-29 23:01:46 +00:00
Bradley Nicholes
5979914ea5 Updated to the new locking API's
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91655 13f79535-47bb-0310-9956-ffa450edef68
2001-10-23 23:33:46 +00:00
Bradley Nicholes
83192997c9 NetWare doesn't have processes so no need to detach something that
doesn't exist


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91633 13f79535-47bb-0310-9956-ffa450edef68
2001-10-22 15:20:22 +00:00
Bradley Nicholes
4f0494a877 First cut at the MPM for NetWare
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91514 13f79535-47bb-0310-9956-ffa450edef68
2001-10-16 23:27:04 +00:00