Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-matthews committed Oct 15, 2020
1 parent e66376d commit e436d77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/_includes/config/locate-session.md
Expand Up @@ -30,13 +30,13 @@ As a user with `root` privileges, open your `php.ini` file and search for the va

## Garbage collection configuration {#session-gc}

To clean up expired sessions Magento application calls `gc` (_garbage collection_) handler randomly according to probability which is calculated by `gc_probability / gc_divisor`. For example, if we set these directives to `1/100` respectively, it means a probability of `1%` (_probability of one call of garbage collection per 100 requests_).
To clean up expired sessions, Magento calls the `gc` (_garbage collection_) handler randomly according to a probability that is calculated by the `gc_probability / gc_divisor` directive. For example, if you set these directives to `1/100` respectively, it means a probability of `1%` (_probability of one call of garbage collection per 100 requests_).

The garbage collection handler uses the `gc_maxlifetime` directive - the number of seconds after which the sessions will be seen as _garbage_ and potentially cleaned up.
The garbage collection handler uses the `gc_maxlifetime` directivethe number of seconds after which the sessions will be seen as _garbage_ and potentially cleaned up.

On some operating systems (Debian/Ubuntu) `session.gc_probability` set to `0` by default, and the garbage collection handler will never be executed.
On some operating systems (Debian/Ubuntu), the default `session.gc_probability` directive is `0`, which prevents the garbage collection handler from running.

`session.gc_` directives from the `php.ini` file can be overwritten in `<magento_root>/app/etc/env.php`:
You can overwrite the `session.gc_` directives from the `php.ini` file in the `<magento_root>/app/etc/env.php` file:

```php
'session' =>
Expand All @@ -47,4 +47,5 @@ On some operating systems (Debian/Ubuntu) `session.gc_probability` set to `0` by
'gc_maxlifetime' => 1440
),
```
The configuration depends on the traffic and specific needs of a certain Magento application.

The configuration depends on the traffic and specific needs of a certain Magento application.

0 comments on commit e436d77

Please sign in to comment.