PHP garbage collector
When a session is created, a flat-file is created on the server(e.g. in /tmp on linux servers).
Since the session ID is a unique identifier, those session files will accumulate over time - the garbage collector will take care of these files and delete old files from time to time.
PHP has a sort of built-in “load-balancing” feature for this garbage collector, so that old session files are not deleted on each and every session request, but with a certain probability.
The default timeout for session files is 1440 seconds or 24 minutes. So a session file can be deleted after that timeout, but it may reside on the server longer, depending on the amount of sessions created.
