1.36.32 random logout and stream scaling issues

Discussions related to the 1.36.x series of ZoneMinder
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: 1.36.32 random logout and stream scaling issues

Post by iconnor »

As we mentioned earlier, the auth logout stuff is almost entirely based around time. We store a cookie to identify the session, and it can expire. The cookie tells us which session to load from the db. We delete those records after a set time.

We keep these sessions alive by doing page refreshes and ajax calls in the background.

So if it is logging you out, we can look to the browser network log to see if it is doing those calls.
We can turn on debugging and look in zmstats.log to see if we are prematurely deleting sessions.
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post by maddios »

Well, what I've noticed is the logout seems to be triggered by the nph-zms process, It'll attempt to refresh the camera snapshots and it'll respond with not authorized. Sometimes I can refresh the page and it'll be logged in still and refresh correctly, but other times it's actually logged out.

As for timezones/time, my cookie timeout is set to like a week now, so timezones shouldn't matter anymore.

I'll try to do some debugging and see if zmstats.log has any info for me
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post by maddios »

I think I've realized what the issue is, it's with the AUTH_RELAY setting, I had it set as plain for whatever reason, and switching it to hashed has fixed my logout issue. I've been logged in for hours now and no more logouts.
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: 1.36.32 random logout and stream scaling issues

Post by iconnor »

Huh.... that's interesting.... I would have expected plain to be MORE reliable.. just not secure... I'll switch to it and see if I can recreate.
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post by maddios »

I still get logged out earlier than the cookie timeout I have set but it's now at least several hours or even overnight.

Before it was literally like every other request would be a 403.
Post Reply