Archive for February, 2008

Symfony, My Family Tells You Merci!

I just received more than 400€ of donations from the symfony community for the birth of my daughter. My family and I are still amazed about the generosity of the gesture, and both my wife and daughter join me to express our big thanks.

With the help of the money gathered by the community, we’ll soon be able to get our daughter out of jail!

Nina In Jail

Database Session Handling and Garbage Collector

Database Session Handling and Garbage Collector

Note for self: When using a distributed session storage with symfony (sfMySQLSessionStorage, sfMemcacheSessionStorage, sfPDOSessionStorage, etc.), don’t forget to check that session.gc_probability must not be set to 0 in the php.ini, and that the line is not commented, which seems to be the case on some PHP distributions.

; Define the probability that the '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.

session.gc_probability = 1
session.gc_divisor     = 100

If set to 0, the session garbage collector will never run, and sessions will pile up forever in your storage facility - eventually inflating the storage space way too much for decent performance.