58#define APR_WANT_STRFUNC
67#if APR_HAVE_SYS_SOCKET_H
68#include <sys/socket.h>
70#if APR_HAVE_SYS_WAIT_H
73#ifdef HAVE_SYS_PROCESSOR_H
74#include <sys/processor.h>
78#error The Event MPM requires APR threads, but they are unavailable.
114#ifndef DEFAULT_SERVER_LIMIT
115#define DEFAULT_SERVER_LIMIT 16
121#ifndef MAX_SERVER_LIMIT
122#define MAX_SERVER_LIMIT 20000
132#ifndef DEFAULT_THREAD_LIMIT
133#define DEFAULT_THREAD_LIMIT 64
139#ifndef MAX_THREAD_LIMIT
140#define MAX_THREAD_LIMIT 100000
143#define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
145#if !APR_VERSION_AT_LEAST(1,4,0)
146#define apr_time_from_msec(x) (x * 1000)
149#ifndef MAX_SECS_TO_LINGER
150#define MAX_SECS_TO_LINGER 30
152#define SECONDS_TO_LINGER 2
158#ifndef DEFAULT_WORKER_FACTOR
159#define DEFAULT_WORKER_FACTOR 2
161#define WORKER_FACTOR_SCALE 16
194module AP_MODULE_DECLARE_DATA mpm_event_module;
280#define TIMEOUT_FUDGE_FACTOR apr_time_from_msec(100)
331#define TO_QUEUE_ELEM_INIT(el) \
332 APR_RING_ELEM_INIT((el), timeout_list)
401#ifndef MAX_SPAWN_RATE
402#define MAX_SPAWN_RATE (32)
420#define ID_FROM_CHILD_THREAD(c, t) ((c * thread_limit) + t)
458#define LISTENER_SIGNAL SIGHUP
489 "Accepting new connections again: "
490 "%u active conns (%u lingering/%u clogged/%u suspended), "
537 const char *from,
int line)
545 "closing socket %i/%pp from %s:%i", (
int)
fd,
csd, from, line);
554 "error closing socket");
558#define close_socket_nonblocking(csd) \
559 close_socket_nonblocking_(csd, __FUNCTION__, __LINE__)
604#ifdef HAVE_PTHREAD_KILL
613#define ST_UNGRACEFUL 2
706 gen =
ps->generation;
711 if (
ps->quiescing != 2) {
716 "Child %d stopped: pid %d, gen %d, "
717 "active %d/%d, total %d/%d/%d, quiescing %d",
718 slot, (
int)pid, (
int)gen,
722 ps->not_accepting = 0;
741 "Child %d started: pid %d, gen %d, "
742 "active %d/%d, total %d/%d/%d",
743 slot, (
int)pid, (
int)gen,
790 "cleanup connection from state %i", (
int)cs->
pub.
state);
843 "deferring close from state %i", (
int)cs->
pub.
state);
873 "closing connection from state %i", (
int)cs->
pub.
state);
1015 c->current_thread =
thd;
1035 "process_socket: connection aborted");
1060 c->current_thread =
thd;
1080 ||
c->clogging_input_filters) {
1132 "process_socket: connection processing %s: closing",
1149 "network write failure in core output filter");
1152 else if (
c->data_in_output_filters ||
1170 "process_socket: apr_pollset_add failure for "
1171 "write completion");
1183 else if (
c->data_in_input_filters) {
1219 "process_socket: apr_pollset_add failure for "
1250 "Stopping process due to MaxConnectionsPerChild");
1262 "clos%s listeners (connection_count=%u)",
1293#if defined(SIGPROCMASK_SETS_THREAD_MASK)
1329 "push2worker: ap_queue_push_socket failed");
1383 "ap_queue_info_wait_for_idler failed. "
1384 "Attempting to shutdown process gracefully");
1399#define EVENT_FUDGE_FACTOR apr_time_from_msec(10)
1419 return ((
t1 <
t2) ? -1 : 1);
1480#define LINGERING_BUF_SIZE (32 * 1024)
1490 "lingering close from state %i", (
int)cs->
pub.
state);
1547 "process_lingering_close: apr_pollset_add failure");
1608 "apr_pollset_remove failed");
1645 "All workers are busy or dying, will shutdown %u "
1705 "connections: %u (clogged: %u write-completion: %d "
1706 "keep-alive: %d lingering: %d suspended: %u)",
1715 "%u/%u workers shutdown",
1736 if (expiry && expiry <
now) {
1739 if (
te->when >
now) {
1763#define NON_WAKEABLE_POLL_TIMEOUT apr_time_from_msec(100)
1789 "apr_pollset_poll failed. Attempting to "
1790 "shutdown process gracefully");
1799 "polled with num=%u exit=%d/%d conns=%d"
1843 "event_loop: unexpected state %d",
1862 APLOGNO(03094)
"pollset remove failed");
1889 "All workers busy, not accepting new conns "
1895 "Too many open connections (%u), "
1896 "not accepting new conns in this process",
1926 "Failed to create transaction pool");
1975 expiry > 0 ? expiry -
now : -1);
2110 "ap_queue_info_set_idle failed. Attempting to "
2111 "shutdown process gracefully.");
2162 APLOGNO(03099)
"ap_queue_pop_socket failed");
2167 te->cbfunc(
te->baton);
2236 "ap_thread_create: unable to create listener thread");
2292 "ap_queue_create() failed");
2307 "ap_queue_info_create() failed");
2318 "creation of the timeout mutex failed.");
2351 "apr_pollset_create with Thread Safety failed.");
2403 "start_threads: Using %s (%swakeable)",
2433 "ap_thread_create: unable to create worker thread");
2453 if (
loops % 120 == 0) {
2457 "slots very quickly (%d of %d)",
2503 "listener has not stopped accepting yet (%d iter)",
iter);
2508 "the listener thread didn't stop accepting");
2514 "apr_thread_join: unable to join listener thread");
2524 "apr_thread_join: unable to join worker "
2542 "apr_thread_join: unable to join the start " "thread");
2568#if AP_HAS_THREAD_LOCAL
2573 "Couldn't initialize child main thread");
2604 "Couldn't initialize signal thread");
2638 "inappropriate, using default",
2652 "ap_thread_create: unable to create worker thread");
2727 "%s termination received, joining workers",
2731 "%s termination, workers joined, exiting",
2751 "BUG: Scoreboard slot %d should be empty but is "
2767 if ((pid =
fork()) == -1) {
2769 "fork: Unable to fork new process");
2787#if AP_HAS_THREAD_LOCAL
2793#ifdef HAVE_BINDPROCESSOR
2802 "processor unbind failed");
2834 int *max_daemon_used)
2861 if (
ps->quiescing == 1) {
2865 "Child %d quiescing: pid %d, gen %d, "
2866 "active %d/%d, total %d/%d/%d",
2867 i, (
int)
ps->pid, (
int)
ps->generation,
2922 "A resource shortage or other unrecoverable failure "
2923 "was encountered before any child process initialized "
2924 "successfully... httpd is exiting!");
2955 "%shutting down one child: "
2956 "active %d/%d, total %d/%d/%d, "
2957 "idle threads %d, max workers %d",
2976 "server reached MaxRequestWorkers setting, "
2977 "consider raising the MaxRequestWorkers "
2985 "server is within MinSpareThreads of "
2986 "MaxRequestWorkers, consider raising the "
2987 "MaxRequestWorkers setting");
2995 "scoreboard is full, not at MaxRequestWorkers."
2996 "Increase ServerLimit.");
3009 "server is at active daemons limit, spawning "
3010 "of %d children cancelled: active %d/%d, "
3023 "server seems busy, (you may need "
3024 "to increase StartServers, ThreadsPerChild "
3025 "or Min/MaxSpareThreads), "
3026 "spawning %d children, there are around %d idle "
3027 "threads, %d active children, and %d children "
3037 if (*max_daemon_used <
slot + 1) {
3038 *max_daemon_used =
slot + 1;
3061 int max_daemon_used = 0;
3072 if (pid.
pid != -1) {
3094 "Ignoring fatal error in child of previous "
3095 "generation (pid %ld).",
3123#if APR_HAS_OTHER_CHILD
3135 "long lost child came home! (pid %ld)",
3154 "children are killed successively!");
3178 max_daemon_used = 0;
3249 "%s configured -- resuming normal operations",
3303 ", shutting down gracefully");
3373 "SIGHUP received. Attempting to restart");
3415 if (
c->master && (!
c->cs ||
c->cs ==
c->master->cs)) {
3462 (startup ?
NULL :
s),
3463 "no listening sockets available, shutting down");
3477 (startup ?
NULL :
s),
3478 "could not duplicate listeners");
3487 (startup ?
NULL :
s),
3488 "could not open pipe-of-death");
3572 "atomics not working as expected - add32 of negative number");
3583 "Couldn't create a Thread Safe Pollset. "
3584 "Is it supported on your platform?"
3585 "Also check system or user limits!");
3597 "apr_proc_detach failed");
3649 for (;
s;
s =
s->next) {
3661 sizeof s->keep_alive_timeout,
ka.q);
3671 wc.tail =
wc.tail->next =
wc.q;
3675 sizeof s->keep_alive_timeout);
3679 sizeof s->keep_alive_timeout,
ka.q);
3680 ka.tail =
ka.tail->next =
ka.q;
3703 "WARNING: ServerLimit of %d exceeds compile-time "
3704 "limit of %d servers, decreasing to %d.",
3708 "ServerLimit of %d exceeds compile-time limit "
3709 "of %d, decreasing to match",
3717 "WARNING: ServerLimit of %d not allowed, "
3721 "ServerLimit of %d not allowed, increasing to 1",
3736 "changing ServerLimit to %d from original value of %d "
3737 "not allowed during restart",
3745 "WARNING: ThreadLimit of %d exceeds compile-time "
3746 "limit of %d threads, decreasing to %d.",
3750 "ThreadLimit of %d exceeds compile-time limit "
3751 "of %d, decreasing to match",
3759 "WARNING: ThreadLimit of %d not allowed, "
3763 "ThreadLimit of %d not allowed, increasing to 1",
3778 "changing ThreadLimit to %d from original value of %d "
3779 "not allowed during restart",
3787 "WARNING: ThreadsPerChild of %d exceeds ThreadLimit "
3788 "of %d threads, decreasing to %d. "
3789 "To increase, please see the ThreadLimit directive.",
3793 "ThreadsPerChild of %d exceeds ThreadLimit "
3794 "of %d, decreasing to match",
3802 "WARNING: ThreadsPerChild of %d not allowed, "
3806 "ThreadsPerChild of %d not allowed, increasing to 1",
3815 "WARNING: MaxRequestWorkers of %d is less than "
3816 "ThreadsPerChild of %d, increasing to %d. "
3817 "MaxRequestWorkers must be at least as large "
3818 "as the number of threads in a single server.",
3822 "MaxRequestWorkers of %d is less than ThreadsPerChild "
3823 "of %d, increasing to match",
3836 "WARNING: MaxRequestWorkers of %d is not an integer "
3837 "multiple of ThreadsPerChild of %d, decreasing to nearest "
3838 "multiple %d, for a maximum of %d servers.",
3843 "MaxRequestWorkers of %d is not an integer multiple "
3844 "of ThreadsPerChild of %d, decreasing to nearest "
3854 "WARNING: MaxRequestWorkers of %d would require %d servers "
3855 "and would exceed ServerLimit of %d, decreasing to %d. "
3856 "To increase, please see the ServerLimit directive.",
3861 "MaxRequestWorkers of %d would require %d servers and "
3862 "exceed ServerLimit of %d, decreasing to %d",
3873 "WARNING: StartServers of %d not allowed, "
3877 "StartServers of %d not allowed, increasing to 1",
3886 "WARNING: MinSpareThreads of %d not allowed, "
3887 "increasing to 1 to avoid almost certain server "
3888 "failure. Please read the documentation.",
3892 "MinSpareThreads of %d not allowed, increasing to 1",
3911 static const char *
const aszSucc[] = {
"core.c",
NULL };
3978 "MaxClients is deprecated, use MaxRequestWorkers "
4031 return "error parsing value";
4034 return "AsyncRequestWorkerFactor argument must be a positive number";
4047 "Number of child processes launched at server startup"),
4049 "Maximum number of child processes for this run of Apache"),
4051 "Minimum number of idle threads, to handle request spikes"),
4053 "Maximum number of idle threads"),
4055 "Deprecated name of MaxRequestWorkers"),
4057 "Maximum number of threads alive at the same time"),
4059 "Number of threads each child creates"),
4061 "Maximum number of worker threads per child process for this "
4062 "run of Apache - Upper limit for ThreadsPerChild"),
4064 "How many additional connects will be accepted per idle "
Symbol export macros and hook functions.
Apache Listeners Library.
Apache Multi-Processing Module library.
APR Portability Routines.
Thread Safe FIFO bounded queue.
APR skip list implementation.
APR Thread Mutex Routines.
APR Thread and Process Library.
APR Versioning Interface.
APR Standard Headers Support.
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
int apr_atomic_dec32(volatile apr_uint32_t *mem)
void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap, apr_uint32_t cmp)
apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)
int ap_start_lingering_close(conn_rec *c)
int ap_run_process_connection(conn_rec *c)
void ap_hook_pre_connection(ap_HOOK_pre_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
conn_rec * ap_run_create_connection(apr_pool_t *p, server_rec *server, apr_socket_t *csd, long conn_id, void *sbh, apr_bucket_alloc_t *alloc)
int ap_pre_connection(conn_rec *c, void *csd)
static apr_status_t push_timer2worker(timer_event_t *te)
#define DEFAULT_SERVER_LIMIT
static void *APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void *dummy)
static int had_healthy_child
static apr_status_t push2worker(event_conn_state_t *cs, apr_socket_t *csd, apr_pool_t *ptrans)
static void join_start_thread(apr_thread_t *start_thread_id)
static int worker_thread_should_exit_early(void)
static void startup_children(int number_to_start)
static apr_pool_t * pruntime
static void close_socket_nonblocking_(apr_socket_t *csd, const char *from, int line)
static int event_query(int query_code, int *result, apr_status_t *rv)
static void *APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void *dummy)
static int event_protocol_switch(conn_rec *c, request_rec *r, server_rec *s, const char *protocol)
static apr_socket_t ** worker_sockets
static void unblock_signal(int sig)
static apr_pool_t * pchild
static void server_main_loop(int remaining_children_to_start)
static int event_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
static volatile int start_thread_may_exit
static int max_spare_threads
static int event_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static void just_die(int sig)
static void clean_child_exit(int code) __attribute__((noreturn))
static event_retained_data * retained
static apr_status_t event_request_cleanup(void *dummy)
static volatile apr_uint32_t listensocks_disabled
static apr_skiplist * timer_skiplist
static event_conn_state_t *volatile defer_linger_chain
static void notify_suspend(event_conn_state_t *cs)
static event_child_bucket * all_buckets
static unsigned int worker_factor
static apr_status_t decrement_connection_count(void *cs_)
static struct timeout_queue * TO_QUEUE_MAKE(apr_pool_t *p, apr_time_t t, struct timeout_queue *ref)
static int min_spare_threads
#define MAX_SECS_TO_LINGER
static void process_timeout_queue(struct timeout_queue *q, apr_time_t expiry, int(*func)(event_conn_state_t *))
static void process_lingering_close(event_conn_state_t *cs)
static apr_pool_t * pconf
static apr_uint32_t threads_shutdown
static struct timeout_queue * short_linger_q
static void TO_QUEUE_APPEND(struct timeout_queue *q, event_conn_state_t *el)
static void event_note_child_stopped(int slot, pid_t pid, ap_generation_t gen)
static timer_event_t timer_free_ring
static void child_main(int child_num_arg, int child_bucket)
static struct timeout_queue * keepalive_q
static void *APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
static apr_uint32_t lingering_count
static void signal_threads(int mode)
static void close_connection(event_conn_state_t *cs)
#define DEFAULT_WORKER_FACTOR
#define NON_WAKEABLE_POLL_TIMEOUT
static int defer_lingering_close(event_conn_state_t *cs)
#define TIMEOUT_FUDGE_FACTOR
static apr_uint32_t clogged_count
#define DEFAULT_THREAD_LIMIT
static void dummy_signal_handler(int sig)
static const char * set_max_workers(cmd_parms *cmd, void *dummy, const char *arg)
static int event_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static const char * set_server_limit(cmd_parms *cmd, void *dummy, const char *arg)
static const char * set_min_spare_threads(cmd_parms *cmd, void *dummy, const char *arg)
static volatile int workers_may_exit
static void event_note_child_started(int slot, pid_t pid)
static apr_uint32_t suspended_count
static int timer_comp(void *a, void *b)
static int event_check_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
static const command_rec event_cmds[]
static struct timeout_queue * linger_q
static const char * set_thread_limit(cmd_parms *cmd, void *dummy, const char *arg)
static void enable_listensocks(void)
static event_child_bucket * my_bucket
static void event_pre_read_request(request_rec *r, conn_rec *c)
static int active_daemons_limit
static fd_queue_t * worker_queue
static const char * set_max_spare_threads(cmd_parms *cmd, void *dummy, const char *arg)
static volatile apr_time_t timers_next_expiry
#define close_socket_nonblocking(csd)
static apr_thread_mutex_t * g_timer_skiplist_mtx
#define WORKER_FACTOR_SCALE
static const char * event_get_name(void)
static int shutdown_connection(event_conn_state_t *cs)
static int event_post_read_request(request_rec *r)
static apr_status_t ptrans_pre_cleanup(void *dummy)
static apr_uint32_t connection_count
static int num_listensocks
#define LINGERING_BUF_SIZE
static int listener_is_wakeable
static APR_INLINE int should_enable_listensocks(void)
static apr_pollfd_t * listener_pollfd
static fd_queue_info_t * worker_queue_info
static apr_os_thread_t * listener_os_thread
static volatile int listener_may_exit
static void disable_listensocks(void)
static void notify_resume(event_conn_state_t *cs, int cleanup)
static struct timeout_queue * write_completion_q
static void update_reqevents_from_sense(event_conn_state_t *cs, int sense)
static apr_thread_mutex_t * timeout_mutex
static const char * set_worker_factor(cmd_parms *cmd, void *dummy, const char *arg)
#define TO_QUEUE_ELEM_INIT(el)
#define SECONDS_TO_LINGER
static apr_pollset_t * event_pollset
static int make_child(server_rec *s, int slot, int bucket)
static const char * set_threads_per_child(cmd_parms *cmd, void *dummy, const char *arg)
static const char * set_daemons_to_start(cmd_parms *cmd, void *dummy, const char *arg)
static void process_socket(apr_thread_t *thd, apr_pool_t *p, apr_socket_t *sock, event_conn_state_t *cs, int my_child_num, int my_thread_num)
static void process_keepalive_queue(apr_time_t expiry)
#define ID_FROM_CHILD_THREAD(c, t)
static apr_int32_t conns_this_child
static int close_listeners(int *closed)
static void setup_threads_runtime(void)
static int check_signal(int signum)
static APR_INLINE apr_uint32_t listeners_disabled(void)
static void close_worker_sockets(void)
static volatile int dying
static void TO_QUEUE_REMOVE(struct timeout_queue *q, event_conn_state_t *el)
static void create_listener_thread(thread_starter *ts)
#define EVENT_FUDGE_FACTOR
static apr_status_t event_register_timed_callback(apr_time_t t, ap_mpm_callback_fn_t *cbfn, void *baton)
static int ap_daemons_to_start
static APR_INLINE int connections_above_limit(int *busy)
static int event_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
static void perform_idle_server_maintenance(int child_bucket, int *max_daemon_used)
static void setup_slave_conn(conn_rec *c, void *csd)
static int resource_shortage
static volatile apr_time_t queues_next_expiry
static int threads_per_child
static void join_workers(apr_thread_t *listener, apr_thread_t **threads)
static void wakeup_listener(void)
static void check_infinite_requests(void)
static void event_hooks(apr_pool_t *p)
static void get_worker(int *have_idle_worker_p, int blocking, int *all_busy)
static int terminate_mode
static int event_pre_connection(conn_rec *c, void *csd)
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
void ap_run_child_init(apr_pool_t *pchild, server_rec *s)
void ap_hook_post_config(ap_HOOK_post_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define AP_DECLARE_MODULE(foo)
void ap_hook_open_logs(ap_HOOK_open_logs_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_check_config(ap_HOOK_check_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define ap_set_module_config(v, m, val)
void ap_hook_pre_config(ap_HOOK_pre_config_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void * ap_retained_data_create(const char *key, apr_size_t size)
const char server_rec server_rec ** ps
void * ap_retained_data_get(const char *key)
const char * ap_get_server_built(void)
const char * ap_get_server_description(void)
#define APEXIT_CHILDFATAL
#define AP_SQ_MS_CREATE_PRE_CONFIG
int ap_exists_config_define(const char *name)
int ap_state_query(int query_code)
apr_socket_t * ap_get_conn_socket(conn_rec *c)
void ap_close_listeners(void)
void ap_close_listeners_ex(ap_listen_rec *listeners)
void ap_listen_pre_config(void)
apr_status_t ap_duplicate_listeners(apr_pool_t *p, server_rec *s, ap_listen_rec ***buckets, int *num_buckets)
int ap_setup_listeners(server_rec *s)
void ap_remove_pid(apr_pool_t *p, const char *fname)
void ap_log_mpm_common(server_rec *s)
void ap_log_pid(apr_pool_t *p, const char *fname)
void ap_log_command_line(apr_pool_t *p, server_rec *s)
server_rec * ap_server_conf
void ap_run_child_status(server_rec *s, pid_t pid, ap_generation_t gen, int slot, mpm_child_status state)
void ap_hook_mpm(ap_HOOK_mpm_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void() ap_mpm_callback_fn_t(void *baton)
void ap_hook_pre_read_request(ap_HOOK_pre_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_protocol_switch(ap_HOOK_protocol_switch_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
ap_vhost_iterate_conn_cb void * baton
#define DEFAULT_MAX_FREE_DAEMON
#define DEFAULT_MIN_FREE_DAEMON
#define DEFAULT_START_DAEMON
#define DEFAULT_THREADS_PER_CHILD
#define AP_SIG_GRACEFUL_STRING
void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret, apr_pool_t *p, server_rec *s)
const char * ap_pid_fname
apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
#define AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND
int ap_max_requests_per_child
#define AP_SIG_GRACEFUL_STOP_STRING
void ap_hook_mpm_register_timed_callback(ap_HOOK_mpm_register_timed_callback_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_run_resume_connection(conn_rec *c, request_rec *r)
void ap_run_suspend_connection(conn_rec *c, request_rec *r)
void ap_run_child_stopping(apr_pool_t *pchild, int graceful)
void ap_hook_mpm_get_name(ap_HOOK_mpm_get_name_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
int ap_graceful_shutdown_timeout
int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
void ap_reclaim_child_processes(int terminate, ap_reclaim_callback_fn_t *mpm_callback)
apr_status_t ap_fatal_signal_child_setup(server_rec *s)
void ap_hook_mpm_query(ap_HOOK_mpm_query_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_mpm_podx_killpg(ap_pod_t *pod, int num, ap_podx_restart_t graceful)
apr_size_t ap_thread_stacksize
apr_uint32_t ap_max_mem_free
apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf)
int ap_mpm_podx_check(ap_pod_t *pod)
apr_status_t ap_mpm_podx_signal(ap_pod_t *pod, ap_podx_restart_t graceful)
apr_status_t ap_mpm_podx_close(ap_pod_t *pod)
int ap_run_drop_privileges(apr_pool_t *pchild, server_rec *s)
apr_status_t ap_mpm_podx_open(apr_pool_t *p, ap_pod_t **pod)
#define APR_OC_REASON_DEATH
#define APR_STATUS_IS_EINTR(s)
#define APR_STATUS_IS_EEXIST(s)
#define APR_STATUS_IS_NOTFOUND(s)
#define APR_STATUS_IS_TIMEUP(s)
#define APR_STATUS_IS_EAGAIN(s)
#define APR_STATUS_IS_EOF(s)
apr_bucket apr_bucket_brigade * a
apr_dbd_transaction_t int mode
const char *const const char *const * aszSucc
#define APR_HOOK_REALLY_FIRST
#define HTTP_INTERNAL_SERVER_ERROR
#define MPM20_MODULE_STUFF
#define AP_DEBUG_ASSERT(exp)
void * ap_calloc(size_t nelem, size_t size) __attribute__((malloc))
void * ap_malloc(size_t size) __attribute__((malloc))
@ CONN_STATE_LINGER_NORMAL
@ CONN_STATE_READ_REQUEST_LINE
@ CONN_STATE_LINGER_SHORT
@ CONN_STATE_CHECK_REQUEST_LINE_READABLE
@ CONN_STATE_WRITE_COMPLETION
const char * ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
#define APR_ALLOCATOR_MAX_FREE_UNLIMITED
void const char apr_status_t(* cleanup)(void *))
apr_file_t apr_int32_t blocking
apr_array_header_t ** result
int strcasecmp(const char *a, const char *b)
apr_vformatter_buff_t * c
apr_interval_time_t apr_int32_t * num
apr_interval_time_t apr_pollcb_cb_t func
apr_abortfunc_t apr_allocator_t * allocator
const char apr_status_t(*) apr_pool_t *poo __attribute__)((nonnull(2, 4)))
#define apr_pool_create(newpool, parent)
#define apr_pcalloc(p, size)
#define APR_RING_ENTRY(elem)
#define APR_RING_UNSPLICE(ep1, epN, link)
#define APR_RING_INSERT_TAIL(hp, nep, elem, link)
#define APR_RING_INIT(hp, elem, link)
#define APR_RING_HEAD(head, elem)
#define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link)
#define APR_RING_SENTINEL(hp, elem, link)
#define APR_RING_EMPTY(hp, elem, link)
#define APR_RING_REMOVE(ep, link)
#define APR_RING_FIRST(hp)
#define APR_RING_NEXT(ep, link)
#define APR_RING_ELEM_INIT(ep, link)
void apr_skiplistnode ** iter
#define APR_INCOMPLETE_READ
const apr_array_header_t * first
apr_int32_t apr_int32_t apr_int32_t err
int apr_exit_why_e * exitwhy
#define APR_PROC_CHECK_SIGNALED(x)
#define APR_PROC_DETACH_DAEMONIZE
#define APR_PROC_DETACH_FOREGROUND
#define apr_time_as_msec(time)
#define apr_time_from_msec(msec)
apr_int64_t apr_interval_time_t
#define apr_time_from_sec(sec)
#define APR_POLLSET_NOCOPY
#define APR_POLLSET_WAKEABLE
#define APR_POLLSET_NODEFAULT
#define APR_POLLSET_THREADSAFE
#define AP_MPMQ_IS_FORKED
#define AP_MPMQ_MPM_STATE
#define AP_MPMQ_MAX_DAEMON_USED
#define AP_MPMQ_MAX_SPARE_DAEMONS
#define AP_MPMQ_MIN_SPARE_THREADS
#define AP_MPMQ_HARD_LIMIT_THREADS
#define AP_MPMQ_IS_THREADED
#define AP_MPMQ_MAX_THREADS
#define AP_MPMQ_MAX_REQUESTS_DAEMON
#define AP_MPMQ_MAX_SPARE_THREADS
#define AP_MPMQ_GENERATION
#define AP_MPMQ_MAX_DAEMONS
#define AP_MPMQ_HARD_LIMIT_DAEMONS
#define AP_MPMQ_MIN_SPARE_DAEMONS
Apache connection library.
static unsigned long num_buckets
Multi-Processing Modules functions.
static int idle_spawn_rate
apr_status_t apr_proc_detach(int daemonize)
apr_status_t apr_thread_exit(apr_thread_t *thd, apr_status_t retval)
apr_os_thread_t apr_os_thread_current()
apr_status_t apr_thread_join(apr_status_t *retval, apr_thread_t *thd)
apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr, apr_int32_t on)
apr_status_t apr_threadattr_create(apr_threadattr_t **new, apr_pool_t *pool)
Apache scoreboard library.
void ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p, int child_num, int thread_num)
int ap_run_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
void ap_update_sb_handle(ap_sb_handle_t *sbh, int child_num, int thread_num)
#define SERVER_BUSY_WRITE
scoreboard * ap_scoreboard_image
apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached)
int ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r)
int ap_update_child_status_from_indexes(int child_num, int thread_num, int status, request_rec *r)
#define SERVER_BUSY_KEEPALIVE
int ap_find_child_by_pid(apr_proc_t *pid)
process_score * ap_get_scoreboard_process(int x)
The representation of a filter chain.
Apache's listeners record.
Structure to store things which are per connection.
A structure to contain connection state information.
ap_listen_rec * listeners
apr_bucket_alloc_t * bucket_alloc
struct event_conn_state_t * chain
struct event_conn_state_t::@46 timeout_list
apr_time_t queue_timestamp
ap_unixd_mpm_retained_data * mpm
int hold_off_on_exponential_spawning
int near_maxclients_reported
struct timeout_queue * ka_q
struct timeout_queue * wc_q
ap_generation_t running_generation
ap_generation_t generation
A structure that represents the current request.
A structure to store information for each virtual server.
struct ap_conf_vector_t * module_config
unsigned int keep_alive_timeout_set
apr_threadattr_t * threadattr
struct timeout_queue * next
struct timeout_head_t head
apr_interval_time_t timeout
ap_generation_t generation
apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
apr_status_t apr_os_sock_get(apr_os_sock_t *thesock, apr_socket_t *sock)
apr_status_t apr_socket_close(apr_socket_t *thesocket)
apr_status_t apr_socket_opt_set(apr_socket_t *sock, apr_int32_t opt, apr_int32_t on)
apr_status_t apr_socket_timeout_set(apr_socket_t *sock, apr_interval_time_t t)
void ap_update_vhost_given_ip(conn_rec *conn)