diff -ru httpd-trunk/server/mpm/event/event.c httpd-trunk.new/server/mpm/event/event.c
--- httpd-trunk/server/mpm/event/event.c	2014-10-04 19:21:39.336815905 -0400
+++ httpd-trunk.new/server/mpm/event/event.c	2014-10-04 19:21:06.303816355 -0400
@@ -2994,13 +2994,15 @@
          * cleared scoreboard
          */
         ap_scoreboard_image->global->running_generation = retained->my_generation;
+        bucket = apr_palloc(s->process->pool, sizeof(int) * num_buckets);
     }
 
-    bucket = apr_palloc(_pconf, sizeof(int) *  ap_daemons_limit);
-
     restart_pending = shutdown_pending = 0;
     set_signals();
     /* Don't thrash... */
+    if (min_spare_threads < num_buckets * threads_per_child) {
+        min_spare_threads = num_buckets * threads_per_child;
+    }
     if (max_spare_threads < min_spare_threads + threads_per_child * num_buckets)
         max_spare_threads = min_spare_threads + threads_per_child * num_buckets;
 
@@ -3013,6 +3015,9 @@
      * that, so we'll just keep track of how many we're
      * supposed to start up without the 1 second penalty between each fork.
      */
+    if (ap_daemons_to_start < num_buckets) {
+        ap_daemons_to_start = num_buckets;
+    }
     remaining_children_to_start = ap_daemons_to_start;
     if (remaining_children_to_start > ap_daemons_limit) {
         remaining_children_to_start = ap_daemons_limit;
@@ -3195,8 +3200,8 @@
 
     enable_default_listener = 1;
     if (have_so_reuseport) {
-#ifdef _SC_NPROCESSORS_ONLN
-        num_of_cores = sysconf(_SC_NPROCESSORS_ONLN);
+#ifdef _SC_NPROCESSORS_CONF
+        num_of_cores = sysconf(_SC_NPROCESSORS_CONF);
 #else
         num_of_cores = 1;
 #endif
@@ -3270,7 +3275,8 @@
                          "atomics not working as expected - add32 of negative number");
             return HTTP_INTERNAL_SERVER_ERROR;
         }
-        retained->idle_spawn_rate = apr_palloc(pconf, sizeof(int) * num_buckets);
+        retained->idle_spawn_rate = apr_palloc(ap_server_conf->process->pool,
+                                               sizeof(int) * num_buckets);
         for (i = 0; i< num_buckets; i++) {
             retained->idle_spawn_rate[i] = 1;
         }
diff -ru httpd-trunk/server/mpm/prefork/prefork.c httpd-trunk.new/server/mpm/prefork/prefork.c
--- httpd-trunk/server/mpm/prefork/prefork.c	2014-10-04 19:21:39.261815906 -0400
+++ httpd-trunk.new/server/mpm/prefork/prefork.c	2014-10-04 19:15:34.523820881 -0400
@@ -969,9 +969,12 @@
 
     ap_log_pid(pconf, ap_pid_fname);
 
-    bucket = apr_palloc(_pconf, sizeof(int) *  ap_daemons_limit);
-    /* Initialize cross-process accept lock for each bucket*/
-    accept_mutex = apr_palloc(_pconf, sizeof(apr_proc_mutex_t *) * num_buckets);
+    if (!retained->is_graceful) {
+        bucket = apr_palloc(s->process->pool, sizeof(int) * ap_daemons_limit);
+        /* Initialize cross-process accept lock for each bucket*/
+        accept_mutex = apr_palloc(s->process->pool,
+                                  sizeof(apr_proc_mutex_t *) * num_buckets);
+    }
     for (i = 0; i < num_buckets; i++) {
         rv = ap_proc_mutex_create(&accept_mutex[i], NULL, AP_ACCEPT_MUTEX_TYPE, NULL,
                                   s, _pconf, 0);
@@ -1002,6 +1005,8 @@
         /* NOTREACHED */
     }
     else {
+    if (ap_daemons_min_free < num_buckets)  /* Don't thrash... */
+        ap_daemons_min_free = num_buckets;
     if (ap_daemons_max_free < ap_daemons_min_free + num_buckets)  /* Don't thrash... */
         ap_daemons_max_free = ap_daemons_min_free + num_buckets;
 
@@ -1013,6 +1018,9 @@
      * start more than that, so we'll just keep track of how many we're
      * supposed to start up without the 1 second penalty between each fork.
      */
+    if (ap_daemons_to_start < num_buckets) {
+        ap_daemons_to_start = num_buckets;
+    }
     remaining_children_to_start = ap_daemons_to_start;
     if (remaining_children_to_start > ap_daemons_limit) {
         remaining_children_to_start = ap_daemons_limit;
@@ -1310,8 +1318,8 @@
 
     enable_default_listener = 1;
     if (have_so_reuseport) {
-#ifdef _SC_NPROCESSORS_ONLN
-        num_of_cores = sysconf(_SC_NPROCESSORS_ONLN);
+#ifdef _SC_NPROCESSORS_CONF
+        num_of_cores = sysconf(_SC_NPROCESSORS_CONF);
 #else
         num_of_cores = 1;
 #endif
diff -ru httpd-trunk/server/mpm/worker/worker.c httpd-trunk.new/server/mpm/worker/worker.c
--- httpd-trunk/server/mpm/worker/worker.c	2014-10-04 19:21:39.352815904 -0400
+++ httpd-trunk.new/server/mpm/worker/worker.c	2014-10-04 19:20:35.703816773 -0400
@@ -1804,9 +1804,12 @@
 
     ap_log_pid(pconf, ap_pid_fname);
 
-    bucket = apr_palloc(_pconf, sizeof(int) *  ap_daemons_limit);
-    /* Initialize cross-process accept lock */
-    accept_mutex = apr_palloc(_pconf, sizeof(apr_proc_mutex_t *) * num_buckets);
+    if (!retained->is_graceful) {
+        bucket = apr_palloc(s->process->pool, sizeof(int) * ap_daemons_limit);
+        /* Initialize cross-process accept lock */
+        accept_mutex = apr_palloc(s->process->pool,
+                                  sizeof(apr_proc_mutex_t *) * num_buckets);
+    }
     for (i = 0; i < num_buckets; i++) {
         rv = ap_proc_mutex_create(&accept_mutex[i], NULL, AP_ACCEPT_MUTEX_TYPE, NULL,
                                   s, _pconf, 0);
@@ -1830,6 +1833,9 @@
     restart_pending = shutdown_pending = 0;
     set_signals();
     /* Don't thrash... */
+    if (min_spare_threads < num_buckets * threads_per_child) {
+        min_spare_threads = num_buckets * threads_per_child;
+    }
     if (max_spare_threads < min_spare_threads + threads_per_child * num_buckets)
         max_spare_threads = min_spare_threads + threads_per_child * num_buckets;
 
@@ -1842,6 +1848,9 @@
      * that, so we'll just keep track of how many we're
      * supposed to start up without the 1 second penalty between each fork.
      */
+    if (ap_daemons_to_start < num_buckets) {
+        ap_daemons_to_start = num_buckets;
+    }
     remaining_children_to_start = ap_daemons_to_start;
     if (remaining_children_to_start > ap_daemons_limit) {
         remaining_children_to_start = ap_daemons_limit;
@@ -2023,8 +2032,8 @@
     }
     enable_default_listener = 1;
     if (have_so_reuseport) {
-#ifdef _SC_NPROCESSORS_ONLN
-        num_of_cores = sysconf(_SC_NPROCESSORS_ONLN);
+#ifdef _SC_NPROCESSORS_CONF
+        num_of_cores = sysconf(_SC_NPROCESSORS_CONF);
 #else
         num_of_cores = 1;
 #endif
@@ -2098,7 +2107,8 @@
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
         }
-        retained->idle_spawn_rate = apr_palloc(pconf, sizeof(int) * num_buckets);
+        retained->idle_spawn_rate = apr_palloc(ap_server_conf->process->pool,
+                                               sizeof(int) * num_buckets);
         for (i = 0; i< num_buckets; i++) {
             retained->idle_spawn_rate[i] = 1;
         }
