1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

85 Commits

Author SHA1 Message Date
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
103f776c25 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174748 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:38:09 +00:00
Stefan Fritsch
18fdb9d711 Some improvements for handling of many connections for MPM event:
- Process lingering close asynchronously instead of tying up worker threads
  (based on patch by Jeff Trawick).

- If the number of connections of a process is above

     threads_per_child  +  WORKER_OVERCOMMIT * (idle_workers - 1)

  (WORKER_OVERCOMMIT is fixed at 2, at the moment), or if all workers are busy,
  don't accept new connections in that process. Such a dynamic connection limit
  is necessary because we may have both async and non-async (ssl) connections.
  WORKER_OVERCOMMIT should be a config option.

- Don't count idle workers of not-accepting processes against MinSpareThreads,
  so that the parent will spawn new processes when necessary.

- If we receive a keep-alive request while all workers are busy, don't block
  but close the connection immediately so that the client will re-connect to a
  different process.

Related changes:

- Log what is going on at trace loglevels.
- Remove the bypass_push poll type flag, this code cannot be hit anymore
  (if it ever could?).
- Add some macro helpers for dealing with timeout queues.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137358 13f79535-47bb-0310-9956-ffa450edef68
2011-06-19 12:23:42 +00:00
Jim Jagielski
2aef21903c Cleanup... most don't need apr_hooks.h at all...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 15:36:32 +00:00
Jim Jagielski
daa5a5c57c OK... a good commit point (we don't quite compile yet though...)
Pull out the worker scoreboard cruft and start moving most
worker stuff to shm. Use slotmem for workers and provide
space for growth.

Redo logic:

  ap_proxy_define_*
  ap_proxy_create_*
  ap_proxy_initialize_*

Right now just for workers, but lay framework for balancers
as well. The idea is to break out the functional parts
to make it easy for dynamics. Defining is simply describing
the worker, and tucking that info away. When we create, we
go ahead and create the shared memory, etc... Initialize
is simply to allow child process to access the shm...

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058622 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:50 +00:00
Stefan Fritsch
ed451e94d1 re-order many struct members for better alignment on 64bit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@959464 13f79535-47bb-0310-9956-ffa450edef68
2010-06-30 22:34:05 +00:00
William A. Rowe Jr
78cf8c9212 Refactor mod_status out of the ExtendedStatus toggle picture, as other
modules can and should be able to use this scoreboard information.
Rename suggestions for such a directive are welcomed.

Note that mod_status toggles the default, to present the ExtendedStatus 
for server operators, whenever it is loaded.  Docs changes to follow.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@903020 13f79535-47bb-0310-9956-ffa450edef68
2010-01-26 00:05:37 +00:00
Jeff Trawick
e583784a18 remove declaration for ap_my_generation, which was replaced with the
AP_MPMQ_GENERATION query in r757853


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@831944 13f79535-47bb-0310-9956-ffa450edef68
2009-11-02 16:26:51 +00:00
Jim Jagielski
abcfac33f8 Provide new ap_update_child_status_from_conn() mostly
for use with mod_noloris.c Add some logic protection, for
NULL ref, which shoulda be there in any case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@821307 13f79535-47bb-0310-9956-ffa450edef68
2009-10-03 12:54:35 +00:00
Jeff Trawick
cb8a82faed remove TPF support
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758936 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 00:05:18 +00:00
Chris Darroch
798fb22128 Remove unused sb_type member from process_score structure and
do major MMN bump.  The sb_type field was added in r89115 but not
removed in r89554 along with related unused additions.

Submitted by: Torsten Foertsch <torsten.foertsch@gmx.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@726118 13f79535-47bb-0310-9956-ffa450edef68
2008-12-12 21:05:37 +00:00
Paul Querna
a73acf02f6 API Cleanup in preperation for 2.4.x, make sure all exported functions or variables contain an ap_ prefix.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
2008-12-02 08:13:36 +00:00
Jim Jagielski
809dd5e30b Add in SeeRequestTail directive, to handle the shortcoming
of only storing 63 bytes of the request, when the requests
are longer than that and only vary towards the end; eg:

   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/apples.jpg
   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/pears.jpg
   GET /disk1/storage/apache/htdocs/images/image-store1/food/fruits/seeded/plums.jpg



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590641 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 12:19:54 +00:00
Bradley Nicholes
a412407a72 The function ap_time_process_request() needs to be declared appropriately if it is going to be used externally (now being called by mod_echo)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@590122 13f79535-47bb-0310-9956-ffa450edef68
2007-10-30 15:46:06 +00:00
William A. Rowe Jr
f75745f995 MMN major bump required; this API is altogether inconsistent, transparent
types should be opaque, opaque types should be transparent.

Solve one aspect, follow the _by_indexes() example for ap_get_scoreboard_worker
family of functions, and the primary one will now accept the abstracted conn_rec
value of sbh to find that connections slot.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@587770 13f79535-47bb-0310-9956-ffa450edef68
2007-10-24 03:50:24 +00:00
Jean-Frederic Clere
cb6949285d lb_score is bigger proxy_worker_stat. Prevent wasting space.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574843 13f79535-47bb-0310-9956-ffa450edef68
2007-09-12 08:34:40 +00:00
Jim Jagielski
38c463cacf Yeah. Good luck with that.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574270 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 14:54:37 +00:00
Jim Jagielski
5437e234f7 Maintain the illusion. It's not worth my time or
energy to care about this anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@574269 13f79535-47bb-0310-9956-ffa450edef68
2007-09-10 14:54:01 +00:00
Jim Jagielski
0703f437c0 Reinstate the lb_score patch, but, protect against
conflicting leakage as per jfc proposal.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573569 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 13:13:37 +00:00
Jim Jagielski
4aee21f5b6 semi-revert 573264. It is totally bogus that we
need to do this, but until we create mod_proxy_structs.h
which can then be included by mod_proxy.h as well as scoreboard.h,
we'll make do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573555 13f79535-47bb-0310-9956-ffa450edef68
2007-09-07 11:58:38 +00:00
Jim Jagielski
c3d947ef89 lb_score *is* proxy_worker_stat... no need to "mask" that
or use wasted space.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@573264 13f79535-47bb-0310-9956-ffa450edef68
2007-09-06 13:46:46 +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
Nick Kew
25a2aca974 Tidy up scoreboard.h (Chris Darroch)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@404849 13f79535-47bb-0310-9956-ffa450edef68
2006-05-07 21:01:48 +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
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
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
William A. Rowe Jr
fc979108b0 Fix some symbols which should -not- be exported, and decorate real_exit_code
with ap_ (this symbol must be exported.)  If the others were desired to be
  public, they should have been ap_xxx decorated.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@154216 13f79535-47bb-0310-9956-ffa450edef68
2005-02-18 00:00:37 +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
Jim Jagielski
9e6b472772 Keep track of time taken to process requests again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149550 13f79535-47bb-0310-9956-ffa450edef68
2005-02-02 19:32:18 +00:00
Roy T. Fielding
c76dd4ecef veto and revert win64 patch: 64bit changes must percolate from the
bottom (APR/system) up -- we can't give the client a 64bit API and
then cast it to 32bits internally without introducing security holes
on other platforms.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105572 13f79535-47bb-0310-9956-ffa450edef68
2004-10-23 22:39:53 +00:00
Allan K. Edwards
6c775f9a3c WIN64: API changes to clean up Windows 64bit compile warnings
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105545 13f79535-47bb-0310-9956-ffa450edef68
2004-10-22 15:22:05 +00:00
Mladen Turk
a536cfe99b Worker shared data has to be visible across all child processes,
so remove creating that data on per-child basis.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105134 13f79535-47bb-0310-9956-ffa450edef68
2004-09-15 12:08:39 +00:00
Graham Leggett
7262ac8dca Improve binary compatiblity. This fix was requested of me before it was committed, but it went in anyway - my bad :(
PR:
Obtained from:
Submitted by:	Mladen Turk <mturk@apache.org>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104409 13f79535-47bb-0310-9956-ffa450edef68
2004-07-29 15:18:40 +00:00
Graham Leggett
e548632412 Add load balancer support to the scoreboard in preparation for
load balancing support in mod_proxy.
PR:
Obtained from:
Submitted by:	Mladen Turk <mturk@apache.org>
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104404 13f79535-47bb-0310-9956-ffa450edef68
2004-07-28 22:50:54 +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
129635b965 fix copyright dates according to the first check in
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102548 13f79535-47bb-0310-9956-ffa450edef68
2004-02-07 19:27:57 +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
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
Jim Jagielski
536cfa19ee Syncing makes no sense now
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94309 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 16:21:48 +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
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
Doug MacEachern
4cdb6b8dec ap_calc_scoreboard_size() needs to be exported for win32
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93590 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 04:10:19 +00:00
Aaron Bannert
d2fe7ba429 Placing the thread-limit and server-limit values, those which define the
size of internal structures in the scoreboard, actually into the
scoreboard allow third-party applications to access those structures.

Submitted by:	Adam Sussman <myddryn@vishnu.vidya.com>
Reviewed by:	Aaron Bannert


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93523 13f79535-47bb-0310-9956-ffa450edef68
2002-02-21 01:30:06 +00:00
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
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
Ryan Bloom
5cd5470300 Change the Windows MPM to only use the pre_mpm phase in the parent process.
The child processes use the child_init phase to reattach to the shared
memory.  This makes Windows work like Unix, which should make it easier
for module authors to write portable modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93119 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 22:35:57 +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
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
Brian Havard
a329ff6cf9 Make calc_scoreboard_size() and init_scoreboard() usable from MPMs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92661 13f79535-47bb-0310-9956-ffa450edef68
2001-12-30 13:27:48 +00:00