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

152 Commits

Author SHA1 Message Date
Bill Stoddard
b1e828a3bf This fixes a bug in mod_status on Windows where restart time was not
properly initialized.

Move ap_restart_time into the scoreboard global area so the child process
on non-forking platforms can have access to it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93502 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 21:09:27 +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
Jeff Trawick
0ea28da356 Stop using HARD_SERVER_LIMIT/HARD_THREAD_LIMIT all over the place
and instead use the mpm query function to retrieve those limits and
use those dynamically-retrieved values when walking the scoreboard.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92510 13f79535-47bb-0310-9956-ffa450edef68
2001-12-18 04:59:13 +00:00
Ian Holsman
86b792b21c Modify post_config hook so that it can return a error,
causing the server not to start.
previous method was to call exit(1) which would not fail
gracefully

PR:
Obtained from:
Submitted by:
Reviewed by:	(Idea only Jeff Trawick)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92144 13f79535-47bb-0310-9956-ffa450edef68
2001-11-23 16:35:22 +00:00
Jeff Trawick
513f380012 fix a *printf() format
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91435 13f79535-47bb-0310-9956-ffa450edef68
2001-10-11 19:53:36 +00:00
William A. Rowe Jr
d2f9c10bb0 Clean up some warnings by summing bytecounts into apr_off_t holders
instead of ulongs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91218 13f79535-47bb-0310-9956-ffa450edef68
2001-10-01 15:51:07 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
Greg Ames
f61f91fc70 don't count workers in processes which aren't actively serving requests.
it is necessary to check for the generation as well as "quiescing", in the
case of a restart where no workers have seen the PoD yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89821 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 06:22:32 +00:00
Greg Ames
d45e862714 mod_status: don't include workers from dead or quiescing processes in the
"requests currently being processed" or "idle" counts

also, change term from "servers" to "workers" - servers sounds like what
you call the whole thing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89820 13f79535-47bb-0310-9956-ffa450edef68
2001-07-31 05:35:06 +00:00
William A. Rowe Jr
7c66cd12b1 More pendantic changes for HTML 3.2/4.01 Transitional compliance, and
XHTML 1.0 legibility.  One XHTML issue remains, <td nowrap>, which has
  an issue that "attribute minimization is not supported in XML".  Since
  ?notables drops that thorny issue, I'm ignoring this for now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89752 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 01:25:24 +00:00
William A. Rowe Jr
6e1243809f Some cast magic for intentional float/int transformations, but I have
no idea what exactly this computation was trying to accomplish...

    req_time = (long)(((ws_record.stop_time - ws_record.start_time) * 1000)
		    + ((ws_record.stop_time - ws_record.start_time) / 1000));


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89712 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 21:15:54 +00:00
Greg Ames
5139e492bd scratch an old itch - give lingering close its own state in the scoreboard.
clean up SERVER_ACCEPTING and SERVER_QUEUEING (never set) while I'm at it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89542 13f79535-47bb-0310-9956-ffa450edef68
2001-07-12 03:20:50 +00:00
Greg Ames
537f07df5e fix pid numbers in mod_status output when using a threaded mpm. pid_buffer was
being indexed by worker slot during initialization, then by process slot when
generating output.

This saves a little storage and a few cycles, too.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89534 13f79535-47bb-0310-9956-ffa450edef68
2001-07-10 22:50:54 +00:00
Jeff Trawick
e47fad222b handle the SERVER_IDLE_KILL state in some of the ExtendedStatus=On
output

I don't have 100% confidence in my guess as to why some of the state labels
are in bold and some aren't (e.g., "<b>Write</b>" vs. "Graceful".  Hopefully
any rhyme or reason to it is maintained with my change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89249 13f79535-47bb-0310-9956-ffa450edef68
2001-05-31 18:10:04 +00:00
Jeff Trawick
303a191fdd a worker being cleaned up is not processing a request; filter out such
workers when counting the number of requests being processed

we won't count such workers as idle either, since they aren't available
to process new requests


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89248 13f79535-47bb-0310-9956-ffa450edef68
2001-05-30 14:14:26 +00:00
Paul J. Reder
1b2262dd30 Make first phase changes to the scoreboard data structures in
preparation for the rewriting of the scoreboard per my posted
design notes. [Paul J. Reder]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89115 13f79535-47bb-0310-9956-ffa450edef68
2001-05-15 02:38:17 +00:00
Jeff Trawick
e4fad412b8 minor scoreboard/status improvements:
. get the SS field in extended status output formatted correctly
  (seconds since beginning of request shouldn't be a huge
  negative number :) )
. use APR_OS_PID_T_FMT and pid_t where appropriate in mod_status
  to avoid casting, some of which may have been broken on some
  architectures


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89048 13f79535-47bb-0310-9956-ffa450edef68
2001-05-07 16:24:14 +00:00
Jeff Trawick
99ba37d329 Get rid of some Apache 1.x OPTIMIZE_TIMEOUTS cruft. Other logic
in 1.3 which used this stuff would send SIGALRM to children in
certain circumstances.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89047 13f79535-47bb-0310-9956-ffa450edef68
2001-05-07 15:49:42 +00:00
Paul J. Reder
a3d7fb947d Changes required to make prefork clean up idle children properly. There was a window during which a starting worker deadlocks when an idle cleanup arrives before it completes init. Apache then keeps trying to cleanup the same deadlocked worker forever (until higher pids come along, but it still will never reduce below the deadlocked pid). Thus the number of children would not reduce to the correct idle level.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88741 13f79535-47bb-0310-9956-ffa450edef68
2001-04-06 20:12:09 +00:00
Jeff Trawick
7f17e1292a Fix a problem displaying status when a threaded MPM is used.
The line

   int indx = (i * HARD_THREAD_LIMIT) + j;

in the vicinity of the change was bad; k needed to be added
instead of j.

I swapped the use of j and k in this section so that i and j
had the same meaning as in an earlier nested loop.  I suspect
that the difference in meaning is what led to the bug.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88397 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 18:41:44 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Bill Stoddard
6fcbaceea5 Performance: apr_now() was being called for -all- requests. Call it only
for calls to server-status.  This module is still a mess...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88265 13f79535-47bb-0310-9956-ffa450edef68
2001-02-21 21:02:57 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Ryan Bloom
ae10526a8c Add an apr_short_interval_time. This allows us to use an apr_interval_time
for apr_time_t - apr_time_t values.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88181 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 00:40:00 +00:00
Ryan Bloom
7a481ed868 Fix the seg fault in mod_status.c. This changes the up_time to an
interval_time.  The segfault is caused by apr_vformatter not understanding
%lld, so we also had to change that to %qd, which solves that problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88176 13f79535-47bb-0310-9956-ffa450edef68
2001-02-15 19:22:02 +00:00
Ryan Bloom
144cf4ee50 Remove some warnings from mod_status.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88170 13f79535-47bb-0310-9956-ffa450edef68
2001-02-15 00:01:32 +00:00
Bill Stoddard
5c84b43404 PR:
Obtained from:
Submitted by:
Get req/sec and bytes/sec status reporting working. Still lots of type
warnings but this is a bit better than before.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88152 13f79535-47bb-0310-9956-ffa450edef68
2001-02-14 03:49:17 +00:00
Jeff Trawick
c66500f5d2 more module build cleanup, removing warnings and some
link errors (from when apr_ ctype macros weren't available)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88070 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 22:21:23 +00:00
Jeff Trawick
6b825eb7e6 get _SC_CLK_TCK defined on Tru64 (and probably some other systems
as well); it works without it on systems which define HZ or don't
have times


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88022 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 13:16:00 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
Bill Stoddard
fb22c5beb2 More mod_status work... Get Current Time, Restart Time and Server uptime
displaying properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87972 13f79535-47bb-0310-9956-ffa450edef68
2001-02-04 03:12:49 +00:00
Bill Stoddard
b119ec0e60 Begin restructuring scoreboard code to enable adding back in
the ability to use IPC other than shared memory.
Get mod_status working on Windows again.

Still to do:
Rename some of the function APIs. Replace all calls to reinit_scoreboard with
ap_create_scoreboard. Add back in support for scoreboard files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87959 13f79535-47bb-0310-9956-ffa450edef68
2001-02-02 21:32:34 +00:00
Bill Stoddard
f806b3a20e Should consider APRizing the entire module. For now, use HAVE_TIMES
to indicate if we have the necessary structures.  This is part of getting
mod_status working on Windows


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87958 13f79535-47bb-0310-9956-ffa450edef68
2001-02-02 19:28:06 +00:00
Ryan Bloom
deab760727 Bring mod_status for 2.0 back in line with mod_status for 1.3. This is
basically a straight port of the 1.3 module to 2.0.  The MPMs need to be
modified a bit to work with mod_status, but prefork, mpmt_pthread, and
dexter have already been changed.  I will fix perchild tonight.  There
is a lot of common code that can be abstracted, and there seems to be a
small bug with regard to what mpmt_pthread and dexter report as current
connections.  ExtendedStatus does work again, although until the bug
mentioned above is fixed, it isn't as useful on mpmt_pthread and dexter.

Next week, I will look at allowing other modules to add data to the
STATUS page and possibly to the scoreboard itself.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87949 13f79535-47bb-0310-9956-ffa450edef68
2001-02-01 21:55:16 +00:00
William A. Rowe Jr
ed1c30bdeb Eliminate a gp fault on mpm_winnt since we don't have a scoreboard table.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87876 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 23:29:39 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Doug MacEachern
40391fb9f2 adjust remaining modules to use the new handler hook method (Alan Edwards)
bring back the old handler prototype by reusing r->handler (dougm)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87617 13f79535-47bb-0310-9956-ffa450edef68
2001-01-08 23:55:12 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00
Doug MacEachern
059d8dd212 prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85976 13f79535-47bb-0310-9956-ffa450edef68
2000-08-02 05:27:38 +00:00
William A. Rowe Jr
da493b8be1 PR:
Obtained from:
Submitted by:
Reviewed by:

  Reverse out all _EXPORT_VAR changes back to their original _VAR_EXPORT
  names for linkage (API_, CORE_, and MODULE_).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85318 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 22:40:44 +00:00
William A. Rowe Jr
86e2a18f2a This patch corrects the issues from the AP_EXPORT and linkage
specification arguments to the ap_hooks.h declarations.  As with
  the APR_ and AP_ patches, API_VAR_EXPORT becomes API_EXPORT_VAR,
  and MODULE_VAR_EXPORT becomes MODULE_EXPORT_VAR.

  I will be happy to revert the inclusion of ap_config.h from 
  httpd.h if this bothers anyone.  More individual modules need
  to be patched if we do so.

  The API_EXPORTs all moved into central storage in the ap_config.h
  header.  Without WIN32 or API_STATIC compile time declarations, 
  these macros remain no-ops.

  This patch also moves the following data from http_main to http_config:

    const char *ap_server_argv0;
    const char *ap_server_root;
    ap_array_header_t *ap_server_pre_read_config;
    ap_array_header_t *ap_server_post_read_config;
    ap_array_header_t *ap_server_config_defines;

  And the following variables had already moved into ap_hooks.c:

    ap_pool_t *g_pHookPool;  (initialized now in http_config)
    int g_bDebugHooks;                   (out of http_config)
    const char *g_szCurrentHookName;     (out of http_config)

  The changes to http_main.c are in preparation for that module to
  move out to a seperate .exe for win32.  Other platforms will be
  unaffected, outside of these changes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85309 13f79535-47bb-0310-9956-ffa450edef68
2000-05-27 05:28:02 +00:00
Roy T. Fielding
2bee4ad19d Update to Apache Software License version 1.1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84879 13f79535-47bb-0310-9956-ffa450edef68
2000-03-31 09:05:25 +00:00
Ryan Bloom
b1c26f031a Fix all the License issues. Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84725 13f79535-47bb-0310-9956-ffa450edef68
2000-03-10 00:07:37 +00:00
Ryan Bloom
70a4fae036 This is a huge change to the configure system. Basically, this name space
protects most, if not all, of the Apache macros.   This has been tested on
Linux using all of the Unix MPM's.  The biggest push was that Apache's
httpd.h header file can no longer include the ap_config.h file.  Most of the
other files include this themselves now.
Submitted by:	Ryan Bloom and Manoj Kasichainula


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84492 13f79535-47bb-0310-9956-ffa450edef68
2000-01-18 23:41:56 +00:00
dgaudet
faff1f01dd time overhaul:
- ap_time_t is a 64-bit scalar, microseconds since epoch
- ap_exploded_time_t corresponds to struct tm with a few extras

probably broken on anything except linux.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84413 13f79535-47bb-0310-9956-ffa450edef68
2000-01-09 05:18:31 +00:00
Ryan Bloom
7cb6de58a7 A few more tweaks to finish the modules work. Now, all of the modules
compile correctly with Apache 2.0. This does run, but it hasn't been tested
any more than simply compiling and running the server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84386 13f79535-47bb-0310-9956-ffa450edef68
1999-12-31 20:32:36 +00:00
Ryan Bloom
0a9c7310ce Fix a bug in mod_status. ap_ht_time expects an ap_time_t type, instead of
a time_t now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84383 13f79535-47bb-0310-9956-ffa450edef68
1999-12-31 17:38:25 +00:00
Manoj Kasichainula
8d98d62709 Add a connection status table to replace the old function of the
scoreboard. It allows MPMs to implement their own mechanism for the
status table and allows any module to add its own per-connection status
entries.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83982 13f79535-47bb-0310-9956-ffa450edef68
1999-10-13 05:24:16 +00:00
Ryan Bloom
c37f14ddf3 Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
1999-08-31 05:35:52 +00:00