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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

Status: Active » Needs review
FileSize
712 bytes

I guess this would be the patch for provision.

helmo’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
helmo’s picture

The hosting_injections module could also help with this.

formatC'vt’s picture

Confirm 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.

formatC'vt’s picture

Status: Needs review » Reviewed & tested by the community

patch work fine for me.

gboudrias’s picture

Issue tags: +Aegir 3.1
gboudrias’s picture

Isn'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.

formatC'vt’s picture

yes, duplicate

gboudrias’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
gboudrias’s picture

Issue tags: -Aegir 3.1