ter

Enabling CodeIgniter's Garbage Collector

My session driver of choice for CodeIgniter is database. A while ago, I noticed millions of rows in the corresponding database table. That means that garbage collector was not working. I checked config.php for sess_regenerate_destroy, but it was already set to false. It was really weird because the problem seemed to have come out of nowhere – not much ago things were working just fine.

After a short investigation, I found out this was and still is a common problem for those who had upgraded their CodeIgniter version from 2.x to 3.x. Turns out, the later possesses heavy changes for Sessions library. And most importantly – fundamental changes in dealing with garbage: CodeIgniter 3.x relies on PHP's native grabage collector. So, in order to get things working again, we need to configure PHP properly.

The Solution

Today there are three PHP-native settings for dealing with session garbage collector. CodeIgniter's Session library has already taken care of one of them – gc_maxlifetime – so there's no need for an extra touch here. The problem lies within the rest: session.gc_probability and/or session.gc_divisor. These two determine when the garbage collector is running. Here's what php.net says:

session.gc_divisor coupled with session.gc_probability defines the probability that the gc (garbage collection) process is started on every session initialization. The probability is calculated by using gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that the GC process starts on each request.

In my case, using ini_get() revealed the following values: 0 and 1000. The equation 0/1000=0 meant there was no chance the garbage collector would even run.

Finally, I solved the problem by using the values officially stated as default and by putting the following lines of PHP code into config/config.php file:

ini_set( 'session.gc_probability',	1 );
ini_set( 'session.gc_divisor',		100 );

Theoretically, this means that the garbage collector usually runs once every 100th request. It's more than enough, but it is up to you whether that causes too many unnecessary hits to database. An alternative solution for heavy-traffic websites could be having a 0% probability on the production site and a Cronjob-based script which removes database rows of the expired sessions.




ter

Nanowires and nanotubes--synthesis, properties, devices and energy applications od one-dimensional materials: symposium held April 9-13, 2012, San Francisco, California, U.S.A. / editors, Junichi Motohisa ... [et al.]

Hayden Library - TA418.9.N35 N396 2012




ter

Principles of nano-optics / Lukas Novotny, University of Rochester, New York, Bert Hecht, Universität Basel, Switzerland

Barker Library - TA418.9.N35 N68 2012




ter

Nanopores for bioanalytical applications: proceedings of the international conference / edited by Joshua Edel, Tim Albrecht

Hayden Library - TA418.9.N35 I5737 2013




ter

Advanced in nanoscience and technology: selected, peer reviewed papers from the 10th China International Nanoscience and Technology Symposium, Hangzhou (2011) and the Nano-Products Exposition, sponsored by Chinese Society of Micro-NanoTechnology and IEEE

Hayden Library - T174.7.C459 2011




ter

Introduction to nanoscience and nanomaterials / Dinesh C. Agrawal

Hayden Library - QC176.8.N35 A387 2013




ter

Intelligent nanomaterials: processes, properties, and applications / edited by Ashutosh Tiwari ... [et al.]

Hayden Library - TA418.9.N35 I5685 2012




ter

Nanocarbon materials and devices: symposium held April 9-13, 2012, San Francisco, California, U.S.A. / editors, Markus J. Buehler ... [et al.]

Hayden Library - TA418.9.N35 N2465 2013




ter

Solution synthesis of inorganic films and nanostructured materials: symposium held April 9-13, 2012, San Francisco, California, U.S.A. / editors, Menka Jain ... [et al.]

Hayden Library - TA418.9.N35 S967 2012




ter

Characterization of semiconductor heterostructures and nanostructures / edited by Carlo Lamberti and Giovanni Agostini, University of Torino, Department of Chemistry, Via Quarello 11, I-10135 Torino, Italy

Barker Library - QC176.8.N35 C43 2013




ter

Physics, chemistry and applications of nanostructures: proceedings of the International Conference Nanomeeting--2013: reviews and short notes: Minsk, Belarus, 28-31 May 2013 / editors, V.E. Borisenko, S.V. Gaponenko, V.S. Gurin, C.H. Kam

Barker Library - QC176.8.N35 N35 2013




ter

Advances in nanoscience and nanotechnology: selected peer reviewed papers from the International Conference on Nanoscience and Nanotechnology (ICNN 2011), July 6-8, 2011, Coimbatore, India / edited by S. Velumani and N. Muthukumarasamy

Hayden Library - QC176.8.N35 I575 2011




ter

Sustainable Synthesis of Nanomaterials: November 28 - December 3, 2011, Boston, Massachusetts, USA / editors H. Fan, M. Knez, S. S. Wong, W. Lee

Hayden Library - TA418.9.N35 S87 2011




ter

Solution synthesis of inorganic functional materials -- films, nanoparticles and nanocomposites: symposium held April 1-5, 2013, San Francisco, California, U.S.A. / editors, Menka Jain, Quanxi Jia, Teresa Puig, Hiromitsu Kozuba

Hayden Library - TA418.9.N35 S656 2013




ter

Nanocontacts--emerging materials and processing for ohmicity and rectification: April 9-13, 2012, San Francisco, California, USA / editors, A.A. Talin, M.S. Islam, C. Lavoie, K-N. Tu

Hayden Library - QC176.8.N35 N3256 2012




ter

Carbon functional nanomaterials, graphene, and related 2d-layered systems: symposia held April 1-5, 2013, San Francisco, California U.S.A. / editors, Mauricio Terrones [and 14 others]

Hayden Library - TA418.9.N35 S972 2013




ter

Nanostructured materials and nanotechnology - 2012: symposium held August 12-17, 2012, Cancún, México / editors, Claudia Gutiérrez-Wing, Instituto Nacional de Investigaciones Nucleares, Ocoyoacac, México, José Luis Rodríguez-

Hayden Library - TA418.9.N35 N3664 2012




ter

Nanoscale materials modification by photon, ion, and electron beams: April 9-13, 2012, San Francisco, California, USA / editors, C. Li

Hayden Library - TA418.9.N35 N357 2012




ter

Titanium dioxide nanomaterials 2012: April 9-13, 2012, San Francisco, California, USA / editors, X. Chen, G. Tulloch, C. Li, J. T. Yates Jr

Hayden Library - TA418.9.N35 T58 2012




ter

Semiconductor nanowires: optical and electronic characterization and applications: November 25-30, 2012, Boston, Massachusetts, USA / editors J. Arbiol, P.S. Lee, J. Piqueras, D.J. Sirbuly

Hayden Library - TK7874.85.S474 2012




ter

Frontiers in micro-nano science and technology: selected, peer reviewed papers from the 12th China International Nanoscience and Technology Symposium, Chengdu (2013) and the Nano-Products Exposition, sponsored by Chinese Society of Micro-Nano Technology,

Hayden Library - T174.7.C456 2013




ter

Micro-nano technology XV: selected, peer reviewed papers from the 15th Annual Conference and 4th International Conference of the Chinese Society of Micro-Nano Technology (CSMNT 2013), November 3-6, 2013, Tianjin, China / edited by Fei Tang ; [Zheng You, c

Hayden Library - T174.7.C46 2013




ter

Handbook of research on nanoscience, nanotechnology, and advanced materials / Mohamed Bououdina and J. Paulo Davim, editors

Hayden Library - T174.7.H367 2014




ter

Proceedings of the 13th International Conference of the European Society for Precision Engineering and Nanotechnology: May 27th-31st, 2013, Berlin, Germany / editors, R. Leach, P. Shore ; proceedings compilation, T. Horwood, D. Nyman, D. Phillips, N. Will

Barker Library - T174.7.I59 2013




ter

Proceedings of the 14th International Conference of the European Society for Precision Engineering and Nanotechnology: June 2nd-6th, 2014, Dubrovnik, Croatia / editors, R. Leach ; proceedings compilation, N. Charlton, D. Nyman, D. Phillips

Barker Library - T174.7.I59 2014




ter

Leading edge of micro-nano science and technology: selected peer reviewed papers from the 11th China International Nanoscience and Technology Symposium (CINST 2012), October 21-25, 2012, Kunming, China / edited by Hailin Cong, Bing Yu and Xing Lu

Hayden Library - T174.7.C459 2012




ter

NANOFORUM 2013: Rome, Italy, 18-20 September 2013 / editors, Marco Rossi, Carlo Mariani, Maria Letizia Terranova ; sponsoring organizations, Sapienza University of Rome, in collaboration with Sapienza Nanotechnology and Nanoscience Laboratory [and 4 other

Online Resource




ter

Enabling science and nanotechnology: 2010 International Conference on Enabling Science and Nanotechnology: ESciNano 2010: KLCC, Kuala Lumpur, Malaysia, 1-3 December 2010 / editors, A. M. Hashim ... [et al.]

Online Resource




ter

Nanoscale materials and devices for electronics, photonics and solar energy / Anatoli Korkin, Stephen Goodnick, Robert Nemanich, editors

Online Resource




ter

Micro-and nanotechnologies for sustainable development: selected, peer reviewed papers from the International Conference on Safe and Sustainable Nanotechnology, October 15-17, 2014, Phitsanulok, Thailand / edited by Puangrat Kajitvichyanukul, Suwit Kirvit

Hayden Library - T174.7.M523 2015




ter

In-situ characterization of material synthesis and properties at the nanoscale with TEM: April 21-25 2014, San Francisco California, USA / editors, M. Chi

Hayden Library - TK7874.85.I55 2014




ter

Interim report on the second triennial review of the National Nanotechnology Initiative / Committee on Triennial Review of the National Nanotechnology Initiative, Phase II, National Materials and Manufacturing Board, Division on Engineering and Physical

Online Resource




ter

Environmental nanotechnology: applications and impacts of nanomaterials / Mark R. Wiesner, editor, Jean-Yves Bottero, editor

Hayden Library - T174.7.E58 2016




ter

Nanomaterial safety in the workplace: pilot project for assessing the impact of the NIOSH Nanotechnology Research Center / Eric Landree, Hirokazu Miyake, Victoria A. Greenfield

Hayden Library - T174.7.L36 2015




ter

Exploiting bioinspired self-assembly for the design of functional and responsive materials: April 6-10, 2015, San Francisco, California, USA / editors, Alberto Saiani [and three others]

Hayden Library - T174.7.E965 2015




ter

Nanophysics, Nanomaterials, Interface Studies, and Applications: Selected Proceedings of the 4th International Conference Nanotechnology and Nanomaterials (NANO2016), August 24-27, 2016, Lviv, Ukraine / Olena Fesenko, Leonid Yatsenko, editors

Online Resource




ter

Advanced Nanotechnology in Engineering and Medical Sciences (ANEMS) International Conference 2017: 20-21 November 2017, Langkawi, Malaysia / editor, Reza Mahmoodian

Online Resource




ter

Biomedical nanomaterials: from design to implementation / edited by Thomas J. Webster and Hilal Yazici

Hayden Library - T174.7.B56 2016




ter

Size really does matter: the nanotechnology revolution / Colm Durkan, University of Cambridge, UK

Barker Library - T174.7.D87 2019




ter

Quaternary ecology, evolution and biogeography [electronic resource] / Valentí Rull.

London : Academic Press, 2020.




ter

Diversity oriented multi-component reaction (DOS–MCR) approach to access natural product analogues: regio- and chemo-selective synthesis of polyheterocyclic scaffolds via one-pot cascade reactions

Org. Biomol. Chem., 2020, 18,3082-3092
DOI: 10.1039/D0OB00368A, Paper
Lakshmanan Palanivel, Vasuki Gnanasambandam
Skeletally diverse and complex polyheterocyclic hybrid scaffolds have been accessed via one-pot three-component reaction by exploiting the build/couple/pair strategy of diversity oriented synthesis.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Recent progress in (hetero)arene cation radical-based heteroarene modification

Org. Biomol. Chem., 2020, 18,2975-2990
DOI: 10.1039/D0OB00441C, Research Article
Hai-Lei Cui
This review summarizes the advances in heteroarene modification via transformations of in situ generated (hetero)arene cation radicals, ranging from 2010 to 2020.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Stereoselective preparation of P,axial-stereogenic allenyl bisphosphine oxides via chirality-transfer

Org. Biomol. Chem., 2020, 18,3017-3021
DOI: 10.1039/D0OB00390E, Communication
Mao-Ran Qiu, Hong-Xing Zheng, Jing-Jing Ye, Bing-Xia Yan, Chang-Qiu Zhao, Qiang Li
Allenyl bisphosphine oxides having variable chirality were prepared in high dr, which was controlled by chiral carbon and phorphorus.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Regio- and stereoselective synthesis of 1,4-enynes by iron-catalysed Suzuki–Miyaura coupling of propargyl electrophiles under ligand-free conditions

Org. Biomol. Chem., 2020, 18,3022-3026
DOI: 10.1039/D0OB00357C, Communication
Ryosuke Agata, Siming Lu, Hiroshi Matsuda, Katsuhiro Isozaki, Masaharu Nakamura
The first iron-catalysed cross coupling of propargyl electrophiles with lithium alkenylborates has been developed.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Progress in recent development of stereoselective synthesis of β2-amino acid derivatives from β-nitroacrylate derivatives

Org. Biomol. Chem., 2020, 18,2991-3006
DOI: 10.1039/D0OB00448K, Review Article
Hao-Wei Zeng, Ping-Yu Wu, Hsyueh-Liang Wu
β2-Amino acids: recent advances in the synthesis of β2-amino acids and their derivatives from various stereoselective transformations of β-nitroacrylates are summarized.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Biochemical characterisation of an α1,4 galactosyltransferase from Neisseria weaveri for the synthesis of α1,4-linked galactosides

Org. Biomol. Chem., 2020, 18,3142-3148
DOI: 10.1039/D0OB00407C, Paper
Kun Huang, Andrea Marchesi, Kristian Hollingsworth, Peter Both, Ashley P. Mattey, Edward Pallister, Helene Ledru, Simon J. Charnock, M. Carmen Galan, W. Bruce Turnbull, Fabio Parmeggiani, Sabine L. Flitsch
A new α1,4 galactosyltransferase has been characterised and used for the synthesis of natural and non-natural cell surface trisaccharide antigens.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Synthesis, radiolabelling and initial biological characterisation of 18F-labelled xanthine derivatives for PET imaging of Eph receptors

Org. Biomol. Chem., 2020, 18,3104-3116
DOI: 10.1039/D0OB00391C, Paper
Marc Pretze, Christin Neuber, Elisa Kinski, Birgit Belter, Martin Köckerling, Amedeo Caflisch, Jörg Steinbach, Jens Pietzsch, Constantin Mamat
Two new fluorine-18-labelled xanthine derivatives with high binding affinity were synthesised as PET-radioligand candidates for Eph receptors.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Non-biaryl atropisomerism at the C–B bond in sterically hindered aminoarylboranes

Org. Biomol. Chem., 2020, 18,3007-3011
DOI: 10.1039/D0OB00421A, Communication
Mélodie Birepinte, Frédéric Robert, Sandra Pinet, Laurent Chabaud, Mathieu Pucheault
Sterically hindered aminoarylboranes with atropisomerism about the C–B bond were prepared and resolved by chiral stationary phase HPLC.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Pseudo-enantiomeric carbohydrate-based N-heterocyclic carbenes as promising chiral ligands for enantiotopic discrimination

Org. Biomol. Chem., 2020, 18,3012-3016
DOI: 10.1039/D0OB00155D, Communication
Alexander S. Henderson, John F. Bower, M. Carmen Galan
The practical synthesis of pseudo-enantiomeric carbohydrate-based NHC–Rh complexes bearing C1 or C3 sterically differentiated positions is reported. We show that steric bulk at either C1 or C3 leads to enantiotopic discrimination in the hydrosilylation of acetophenone.
The content of this RSS Feed (c) The Royal Society of Chemistry




ter

Synthesis and aggregation behaviour of single-chain, 1,32-alkyl-branched bis(phosphocholines) – part 2: lateral chain length triggers self-assembling from sheets to fibres to vesicles

Org. Biomol. Chem., 2020, Advance Article
DOI: 10.1039/D0OB00534G, Paper
Kai Gruhle, Max Tuchtenhagen, Sindy Müller, Gerd Hause, Annette Meister, Simon Drescher
The synthesis of six single-chain, alkyl-branched bolalipids and first investigations of the lyotropic behaviour of these lipids are reported.
To cite this article before page numbers are assigned, use the DOI form of citation above.
The content of this RSS Feed (c) The Royal Society of Chemistry