Sessions Are Not Removed

Problem

The system is not removing sessions from the location in your session configuration automatically.

Cause

The location in the session.save_path PHP setting (or the database table when using database sessions) is using non-standard values for the PHP session.gc_probability and session.gc_divisor settings. Most commonly, this is 0 for one or both of them.

These settings are part of a probability-based calculation and have values of 1 and 1000 respectively, meaning that there is a 1% chance of executing garbage collection per request.

Solution

Work with your hosting provider or system administrator to return these settings to their default values.

Last modified: May 29, 2024