Speaking specifically about the last change done for the default.settings.php file: No, you do not need to apply that change to the setting.php file, except in the case you need to change the default value used for the lock expiration timeout, which is 900 and which usually sufficient for any site.
The following is the patch for the change described in [D7] Cron lock time limit is too short and does not prevent multiple, concurrent cron runs.
diff --git a/includes/common.inc b/includes/common.inc
index 0f6ced800d..094db87f54 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5532,7 +5532,8 @@ function drupal_cron_run() {
drupal_alter('cron_queue_info', $queues);
// Try to acquire cron lock.
- if (!lock_acquire('cron', 240.0)) {
+ $cron_lock_expiration_timeout = variable_get('cron_lock_expiration_timeout', 900.0);
+ if (!lock_acquire('cron', $cron_lock_expiration_timeout)) {
// Cron is still running normally.
watchdog('cron', 'Attempting to re-run cron while it is already running.', array(), WATCHDOG_WARNING);
}
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index c521bc3b3a..4458ee47d0 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -821,3 +821,15 @@
*/
# $conf['drupal_http_request_strip_sensitive_headers_on_host_change'] = TRUE;
# $conf['drupal_http_request_strip_sensitive_headers_on_https_downgrade'] = TRUE;
+
+/**
+ * Cron lock expiration timeout:
+ *
+ * Each time Drupal's cron is executed, it acquires a cron lock. Older releases
+ * of Drupal set the default cron lock expiration timeout to 240 seconds. This
+ * duration was considered short, because it often caused concurrent cron runs
+ * especially on busy sites heavily utilizing cron.
+ *
+ * Use this variable to set a custom cron lock expiration timeout (float).
+ */
+# $conf['cron_lock_expiration_timeout'] = 900.0;
The last comment explains exactly what the purpose of that value is and why it was introduced.
Each time Drupal's cron is executed, it acquires a cron lock. Older releases of Drupal set the default cron lock expiration timeout to 240 seconds. This duration was considered short, because it often caused concurrent cron runs especially on busy sites heavily utilizing cron.
If you do not notice any Attempting to re-run cron while it is already running. error in the Drupal log, then you do not need to add that line ($conf['cron_lock_expiration_timeout'] = 900.0;
) to the settings.php file used for the site. Otherwise, you need to add it.
does the code automatically look up in default.settings.php when it can't find something in settings.php?
No, it does not. Drupal only load the settings.php file, when running. Any change done to the default.settings.php file that is relevant for you need to be copied into the settings.php file used for the site. Keep in mind that, in some cases, the copied lines could need to be adapted for your use case.