pulse-active-sessions icon indicating copy to clipboard operation
pulse-active-sessions copied to clipboard

Redis Web Session active sessions counting not working

Open hoRacy opened this issue 1 year ago • 5 comments
trafficstars

I experiencing an issue where session counting using Redis is not functioning correctly for our web session.

Steps to Reproduce:

  • Configure Redis as the session store.
  • Initiate multiple sessions by accessing the web application from different browsers or devices.
  • Observe the session count in Redis.

Expected Behavior:

  • The session count in Redis should accurately reflect the number of active sessions.

Actual Behavior:

  • The session count does not update correctly and does not reflect the active sessions.

Additional Information:

  • Redis Version: 6.0.16 Laravel: 10.48.19

Thank you!

pulse

hoRacy avatar Aug 12 '24 15:08 hoRacy

@hoRacy - Thanks for briefly raising an issue. Issue resolved. Could you please check at your end with the web session using Redis.

ruchit288 avatar Aug 13 '24 09:08 ruchit288

I got the same issue. I just updated to 1.7.1 but sadly the redis count is still at 0.

Heyian avatar Aug 13 '24 21:08 Heyian

@Heyian @ruchit288 - unfortunately, still not working :(

hoRacy avatar Aug 14 '24 09:08 hoRacy

Something I'd like to point out, in my case, it works locally but not on any of my hosting providers. I have tested it on 3 different providers and the count stays at 0.

Heyian avatar Aug 14 '24 16:08 Heyian

Not working for me locally too, with Redis sessions

ipearx avatar Aug 25 '24 08:08 ipearx

Same here. Not working

atiabjobayer avatar Aug 14 '25 14:08 atiabjobayer

It only works if, during login, you save "auth.password_confirmed_at" with time() in the user's session.

In the AuthenticatedSessionController, add the following line to the store function: $request->session()->put('auth.password_confirmed_at', time());

And in the config/pulse.php file, make sure to include the following configuration:

return [
    'active_session_threshold' => 100,

    // Etc

    'recorders' => [
        \Vcian\Pulse\PulseActiveSessions\Recorders\PulseActiveSessionRecorder::class => [],
    ],
];

marco-easyprog avatar Sep 05 '25 12:09 marco-easyprog