Default Drupal 7 settings.php comes with some PHP variables that are pretty important, especially on Debian OS.
Settings.php says:
/**
* Some distributions of Linux (most notably Debian) ship their PHP
* installations with garbage collection (gc) disabled. Since Drupal depends on
* PHP's garbage collection for clearing sessions, ensure that garbage
* collection occurs by using the most common settings.
*/
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
Long story short, Debian sets in default configuration probability to 0. If probability is 0, that means that PHP garbage collector will never be triggered which means it will never clear sessions from Drupal. That will result in never ending grow of session table until it reaches a couple of million rows and starts to slow down site drastically (or can be noticed that mysql dump increased a lot - few GBs even). It doesn't matter that Debian sets to 0. Let's say administrator decides on global level on server to be set to zero on any distro (I am saying this so you do not label this as Debain's fault or whatever). Aegir should provide local PHP vars correct just the way default Drupal 7 does.
Aegir creates settings.php different and without these two PHP vars. Should Aegir include all PHP vars given (default) by Drupal 7 instead removing them? On IRC kristofferw told me I can include those in global.inc but I believe Aegir should include by default all variables that default Drupal provides. So, should Aegir somewhere be updated to include missing php vars or?
For the reference I included default settings.php and one Aegir settings.php so those can be compared.
Comment | File | Size | Author |
---|---|---|---|
#1 | missing_php_vars_from-2449695-1.patch | 712 bytes | helmo |
settings_both.tar_.gz | 9.58 KB | milovan |
Comments
Comment #1
helmo CreditAttribution: helmo at Initfour websolutions commentedI guess this would be the patch for provision.
Comment #2
helmo CreditAttribution: helmo at Initfour websolutions commentedComment #3
helmo CreditAttribution: helmo at Initfour websolutions commentedThe hosting_injections module could also help with this.
Comment #4
formatC'vt CreditAttribution: formatC'vt as a volunteer commentedConfirm bug. Manual drupal install have these variables (in
admin/reports/status/php
) and Aegir's not.@helmo
hosting_injections
can't help, because there no d7 version.Comment #5
formatC'vt CreditAttribution: formatC'vt as a volunteer commentedpatch work fine for me.
Comment #6
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedComment #7
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedIsn't this actually a duplicate of #1902542: Review ini_set() block in default settings.php for D7? The patch in that issue seems to include the code for this one and more.
Comment #8
formatC'vt CreditAttribution: formatC'vt as a volunteer commentedyes, duplicate
Comment #9
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedComment #10
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commented