Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

stepassia's avatar

Prevent session expire

Hi to all, I've an application with Laravel 5.3 and Extjs and, randomly, session expire during interaction client/server (the webapp make a lots of ajax call to server).

This my session.php configuration:

    'driver' => env('SESSION_DRIVER', 'file'),
    'lifetime' => 120,
    'expire_on_close' => false,
    'encrypt' => false,
    'files' => storage_path('framework/sessions'),
    'connection' => null,
    'table' => 'sessions',
    'store' => null,
    'lottery' => [2, 100],
    'cookie' => 'laravel_session',
    'path' => '/',
    'domain' => env('SESSION_DOMAIN', null),
    'secure' => false,
    'http_only' => true,

Any idea? Thanks

0 likes
2 replies
jekinney's avatar

Change your lifetime from 120 to something higher.

Please or to participate in this conversation.