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

1644 Commits

Author SHA1 Message Date
Paul Querna
c37300112c Fix spelling
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200456 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 18:05:47 +00:00
Jeff Trawick
00b4adb3b1 revert accidental commit 1200129
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200140 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:19:21 +00:00
Jeff Trawick
3c7b587593 clean up unused ap_my_generation variable
(presence is odd, since this variable as an API was supposedly removed
  long ago, and a similarly named static variable was removed in r1078286)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200132 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:13:16 +00:00
Jeff Trawick
e4f5c7198e clean up unused ap_my_generation variable
(presence is odd, since this variable as an API was supposedly removed
  long ago, and a similarly named static variable was removed in r1078286)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200129 13f79535-47bb-0310-9956-ffa450edef68
2011-11-10 04:10:42 +00:00
Stefan Fritsch
3095a74384 Downgrade log message which is triggered when client disconnects
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1200033 13f79535-47bb-0310-9956-ffa450edef68
2011-11-09 23:19:06 +00:00
Stefan Fritsch
340375975a Add comment why the code is disabled
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1188951 13f79535-47bb-0310-9956-ffa450edef68
2011-10-25 22:32:22 +00:00
Stefan Fritsch
eececab6db Comment out some incomplete code that does nothing but produce a compiler
warning


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1186545 13f79535-47bb-0310-9956-ffa450edef68
2011-10-19 22:40:06 +00:00
William A. Rowe Jr
4d6a412856 Downgrade to DEBUG level several messages which were all redundant
to these NOTICE level messages;

Child: Starting %d worker threads
Child: All worker threads have exited


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181216 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 20:22:18 +00:00
William A. Rowe Jr
e1d2cbab65 Resolve server and remote IP's in the AcceptFilter 'none' path.
Lower the volume on a number of debug messages (and omit errno
  where we have no errno).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1181140 13f79535-47bb-0310-9956-ffa450edef68
2011-10-10 19:02:09 +00:00
Stefan Fritsch
7d0348cd78 If a child is created just before graceful restart and then exits because
of a missing lock file, don't shutdown the whole server.

PR: 39311
Submitted by: Shawn Michael <smichael rightnow com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180742 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 23:10:12 +00:00
Stefan Fritsch
be61728fa5 Check the return value from ap_run_create_connection in mpm_event.
Add a todo in mpm_simple

PR: 41194
Submitted by: Davi Arnaut


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1180737 13f79535-47bb-0310-9956-ffa450edef68
2011-10-09 22:41:54 +00:00
Jim Jagielski
427c85bd23 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@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +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
01ed21af9d Add wrappers for malloc, calloc, realloc that check for out of memory
situations.  Use them in most places where malloc, and friends are used.
This results in clean error messages in an out of memory situation instead of
segfaulting or silently malfunctioning. In some places, it just allows to
remove some logging code.

PR 51568, PR 51569, PR 51571.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1172686 13f79535-47bb-0310-9956-ffa450edef68
2011-09-19 16:25:42 +00:00
Stefan Fritsch
d4e7fad995 Install signal handlers for crashes before detaching. Previously, there
was a time span where crashes would be neither visible on the console nor
logged in the error log.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151234 13f79535-47bb-0310-9956-ffa450edef68
2011-07-26 20:37:49 +00:00
Stefan Fritsch
344dbd4e82 Reduce period during startup and restart where a successive signal may be lost
PR: 43696
Submitted by: Arun Bhalla <arun shme net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1151233 13f79535-47bb-0310-9956-ffa450edef68
2011-07-26 20:36:56 +00:00
Rainer Jung
a68daf2a82 Allow to specify module specific custom linker flags
via the MOD_XXX_LDADD variables.

Use APR_ADDTO instead of APR_SETVAR or direct
variable assignment.

This is especially useful when building mod_lua
or mod_deflate against a lua resp. libz which
are installed in non-standard locations.
One can add "-R ..." to MOD_LUA_LDADD and
MOD_DEFLATE_LDADD before configure to fix
the RPATH/RUNPATH of those modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142938 13f79535-47bb-0310-9956-ffa450edef68
2011-07-05 09:24:23 +00:00
Jeff Trawick
c98f303210 Initialize apr_thread_t pointer to NULL so that apr_os_thread_put()
allocates a new one.  This resolves a crash seen on WinXP, caused
by r1103595.

Bad revision found by: Gregg L Smith <gls gknw.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142264 13f79535-47bb-0310-9956-ffa450edef68
2011-07-02 18:53:29 +00:00
Stefan Fritsch
4b3f0aaf96 Log the deprecation warning at level info, not warn
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137813 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 22:57:24 +00:00
Stefan Fritsch
5f2cf595f0 Fix search'n'replace error: Actually warn if MaxClients is used
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137757 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:47:23 +00:00
Stefan Fritsch
5aacc550a2 New AsyncRequestWorkerFactor directive to influence how many
connections will be accepted per process


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137755 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:45:08 +00:00
Stefan Fritsch
d85204f752 Remove dead assignment, as pointed out by Chris Wilson <cwilson vigilantsw com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137748 13f79535-47bb-0310-9956-ffa450edef68
2011-06-20 19:06:27 +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
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
Stefan Fritsch
6fb57c93e6 If MaxMemFree is set, limit the number of recycled pools that is kept
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137262 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 22:29:49 +00:00
Stefan Fritsch
ff38d959c6 Some logging tweaks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137261 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 22:24:53 +00:00
Stefan Fritsch
9d558a907c Formatting changes, reuse 'now' variable instead of declaring a new one
in several blocks.

No significant code change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137260 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 22:23:53 +00:00
Stefan Fritsch
0bb879b92b Fix graceful restart aborting connections
PR: 43359
Submitted by: Takashi Sato <takashi lans-tv com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1137182 13f79535-47bb-0310-9956-ffa450edef68
2011-06-18 13:21:20 +00:00
Stefan Fritsch
c9fd2623da Introduce ap_(get|set)_core_module_config() functions/macros and use them
everywhere.

We know that the core module has module_index 0. Therefore we can save
some pointer operations in ap_get_module_config(cv, &core_module) and
ap_set_module_config(cv, &core_module, val). As these are called rather often,
this may actually have some (small) measurable effect.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1132781 13f79535-47bb-0310-9956-ffa450edef68
2011-06-06 21:26:56 +00:00
William A. Rowe Jr
60b8058931 This is rather irritating.
We override exit() throughout the httpd build in order to intercept and
report our status through the service control manager.

We must include process.h prior to overriding exit().

I seem to remember that this is the reason apr.hw once included 
process.h unilaterally, to avoid this conflict over exit.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1129878 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 19:37:56 +00:00
Jeff Trawick
f60e484691 fill in conn_rec::current_thread for WinNT, NetWare, and OS/2 MPMs
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103595 13f79535-47bb-0310-9956-ffa450edef68
2011-05-16 02:19:42 +00:00
Jeff Trawick
0598d43a1b fix some typos in comments
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1103593 13f79535-47bb-0310-9956-ffa450edef68
2011-05-16 02:01:08 +00:00
William A. Rowe Jr
737a5a1d47 Not possible; you don't declare a variable const and then
maniuplate it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1100443 13f79535-47bb-0310-9956-ffa450edef68
2011-05-07 04:15:01 +00:00
Jeff Trawick
b615a1ca10 WinNT MPM has hard-coded daemon limit of 1, not 0
trunk mod_status relies on this value for proper formatting
of the workers; now we see '-' for the idle WinNT MPM workers
instead of ' '


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096814 13f79535-47bb-0310-9956-ffa450edef68
2011-04-26 17:26:44 +00:00
Jeff Trawick
462c69e0b5 Add child_status hook for tracking creation/termination of MPM child
processes.  Add end_generation hook for notification when the last
MPM child of a generation exits.

end_generation is implemented completely by core using the
child_status hook run by the MPM.

simple and mpmt_os2 MPMs don't currently run the child_status
hook, so neither hook is invoked with those MPMs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1096609 13f79535-47bb-0310-9956-ffa450edef68
2011-04-25 21:21:22 +00:00
Jeff Trawick
3f64cea357 AP_ENABLE_V4_MAPPED with WinNT MPM
mpm_winnt.c: Fail to compile if enabled, and add a hint about the
               issue to address before it will work.
  configure.in: Move the --enable-v4-mapped check to below the
                MPM logic, and default to --disable-v4-mapped if
                using the WinNT MPM


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091467 13f79535-47bb-0310-9956-ffa450edef68
2011-04-12 15:26:25 +00:00
Jeff Trawick
51ad225698 add some debug logging to show more information about passing of sockets
between parent and child

the extra info is helpful when using a generic listener on an IPv6-
enabled box when either IPV6_V6ONLY isn't defined for the APR build
or httpd is built with IPv4-mapped addresses enabled 

in that case you'll see the parent writing one socket but the child
expecting too, before it bails out with

(OS 109)The pipe has been ended.  : Child: Unable to read socket data 
from parent


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091421 13f79535-47bb-0310-9956-ffa450edef68
2011-04-12 14:15:27 +00:00
Jeff Trawick
4fd1d0eb42 axe the cast in the call to our mpm_nt_eventlog_stderr_open()
by fixing the function


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091079 13f79535-47bb-0310-9956-ffa450edef68
2011-04-11 14:10:59 +00:00
Jeff Trawick
bd456ceef9 match expected type of arg to StartService()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1091076 13f79535-47bb-0310-9956-ffa450edef68
2011-04-11 13:56:17 +00:00
Jeff Trawick
ebab39cd98 don't try to shut down child if it wasn't created
(or, fix warning about reference to uninitialized variable
child_exit_event)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090634 13f79535-47bb-0310-9956-ffa450edef68
2011-04-09 17:20:23 +00:00
Jeff Trawick
e5c9d39f76 WinNT MPM: Improve robustness under heavy load.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090621 13f79535-47bb-0310-9956-ffa450edef68
2011-04-09 16:19:33 +00:00
Jeff Trawick
e5d1eb382f Fix some MinGW build issues...
mpm_winnt.c:  MinGW doesn't currently define the Windows
              STACK_SIZE_PARAM_IS_A_RESERVATION symbol

mpm_unix.c:   Bypass all this code on Windows  (too much trouble
              to keep it out of Makefile)

mpm_common.h: Skip over definitions of functions not available on
              Windows to keep references out of exports.c.

PR: 49535
Submitted by: John Vandenberg <jayvdb gmail.com>
Minor tweaks by: trawick

Other commits for this PR: r1089950, r1089951, r1089954


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090614 13f79535-47bb-0310-9956-ffa450edef68
2011-04-09 15:56:27 +00:00
Jeff Trawick
eb90cbfaa1 fix some logging glitches in the WinNT MPM:
the MPM's equivalent of "reached MaxClients" is now ERR instead of
WARNING

the message when the MPM child exits due to excessive errors is
raised from ERR to CRIT

the caller of mpm_get_completion_context() could log random error
values (GetLastError() or rv), so solve as follows:

. mpm_get_completion_context() always logs its errors
. caller only logs when it is taking a rare action on such errors, and
  doesn't pretend to know the error code of the last such error


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090605 13f79535-47bb-0310-9956-ffa450edef68
2011-04-09 15:03:36 +00:00
Jeff Trawick
bdc6c0dde2 log message fixes/tweaks
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1090412 13f79535-47bb-0310-9956-ffa450edef68
2011-04-08 19:37:41 +00:00
Jeff Trawick
6c84112b5c Stop explicitly including the current pid in WinNT MPM messages,
as it is part of the default log format.  (And these lines needed
touching anyway since %d was the wrong format string.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089857 13f79535-47bb-0310-9956-ffa450edef68
2011-04-07 12:36:56 +00:00
Jeff Trawick
09999dd93b axe ap_registry_get_server_root(), which seems to have been unused
after httpd 1.3 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089688 13f79535-47bb-0310-9956-ffa450edef68
2011-04-07 00:03:09 +00:00
Jeff Trawick
f472be8363 format string fixes:
DWORD is unsigned long and needs %lu instead of %d or %i


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089659 13f79535-47bb-0310-9956-ffa450edef68
2011-04-06 23:00:44 +00:00
Jeff Trawick
2ff7ad7761 HANDLE is PVOID which is reasonably formatted by %pp, but not by %d
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089639 13f79535-47bb-0310-9956-ffa450edef68
2011-04-06 21:37:20 +00:00
Jeff Trawick
406c2fb5cc can't format time_t with %d; cast this small interval time to int
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089624 13f79535-47bb-0310-9956-ffa450edef68
2011-04-06 20:59:47 +00:00
Jeff Trawick
35aa4599ac Log the OS socket (int) instead of the apr_socket_t *.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089614 13f79535-47bb-0310-9956-ffa450edef68
2011-04-06 20:14:35 +00:00