Question: I'm desperate. We made an application in Laravel 5.2. It works well. But the session ends after approximately 20 minutes of initiation, although the lifetime setting is 24 hours. Something is deleting the session file in the /storage/framework/sessions folder, but we cannot determine what it is.

Please, I need any suggestions on how to find out what happens.

I have already put messages in the file log FileSessionHandler.php to detect when the session is destroyed or deleted by the GC. I have searched for other accesses in the program to the session files folder. I've been on this for about 30 hours without results.

All comments sent to me will be applied immediately.

Thank you!

Answer: 
in session.php

```
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => env('SESSION_LIFETIME', your_time),

```

in .env

```
SESSION_LIFETIME=your_time

```

if in env SESSION\_LIFETIME is set then it get the value from env otherwise get it from session.php
after changing .env 

```
php artisan config:cache

```
The problem was that the internet provider removes information from the connection periodically. The problem was solved when changing providers.