Webserver.session.timeout

I display PiHole on a dashboard-style screen in a Chrome browser with multiple tabs that, with some extensions installed, rotate through the tabs every 3 minutes and refresh those tabs every 30 minutes.

PiHole is hosted on a Debian 13 VM in Proxmox which has been allocated 32Gb disk and 2Gb RAM. The OS is up to date, as is PiHole itself as of this week.

Expected Behaviour:

I have always had the webserver.session.timeout value in Settings > All Settings > Webserver and API set to 86400, and with the settings of the browser refresh extension, ensures that the session effectively never timeouts.

Actual Behaviour:

Since upgrading to the latest available versions of Core, FTL and Web Interface earlier this week, the web session is timing out after a period of time that is well short of the 86400 seconds, possibly even less than 3600 seconds and returns to the login screen/page.

As a test, I also displayed PiHole from a second computer and experienced the same issue after a short period of time.

Debug Token:

https://tricorder.pi-hole.net/NgrFr5EB/

Your log shows webserver.session.timeout is set to 86400, as you said.

What do you see on Currently active sessions table, on the Settings > Web interface / API page?

(You need to change to "Expert" mode to see this table)

Check the "Valid until" column.

If the session expiration time is correct, but the session is expiring before that, maybe the issue is on the browser side:

  • Did you try to clear the cache and cookies?
  • Do you see the same if you try on a different browser or different machine?

… and less than an hour after completing your suggested actions to take, PiHole timed out and returned to the login screen

Those actions were not meant to address the issue, but to help you answering rdwebdesign's questions, which aren't provided yet.

I replied to the email but it doesn’t look like it has reflected in the thread.

I have the following showing for Currently Active Sessions :

image.png

For reference, it is currently 7:15PM on 27th February.

All sessions have a Valid Until date & time that are at least 3 hours from now.

How many sessions should I normally be seeing - just a single for the primary display (Dashboard screen)?

IP address .200.210 is my "dashboard" computer and .100.21 is a secondary computer I am testing from.

As you suggested, i have cleared the browser's cache and cookies and will monitor the performance over the next few hours.

I never had this issue prior to upgrading all three components of PiHole earlier this week, so not sure how/why it has suddenly occurred post the PiHole upgrade.

Additional information since my last post/update …

I discovered that the Chrome extension that rotates the browser tabs had also received an update during the week.
I thought that the updated extension may have been the cause of the issue, so i disabled the extension and/or removed the PiHole tab from the sequence but the session continued to timeout after a short period of time.

I then attempted another browser (Edge), which does not have any extensions loaded and the session also timed out.
I then attempted in InPrivate/Incognito sessions of both browsers and they both also timed out after 5-10 minutes.
All attempts have been from the same computer, but i experience the same issue regardless of which computer i use.

UPDATE : As my instance of PiHole is a VM in Proxmox, I reverted to a backup that was from prior to last week’s release of PiHole.

Under these conditions, the interface does not timeout.
I updated the OS only - no change.
As soon as I update PiHole to the latest release, the interface times out shortly after.

1 Like

UPDATE :

I run multiple PiHoles in a VRRP configuration using keepalived for a vrrp IP between the two instances.
Instance #1 is the MASTER and instance #2 the BACKUP.

I originally created instance #2 by cloning #1 and reconfiguring any/all applicable references, including that of keepalived.
I know this works as expected because #2 becomes the MASTER when #1 is offline and the status quo is restored when #1 comes online again.

Both instances are running the same release of PiHole, but found that the timeout only ever occurs with instance #1.
When I shutdown instance #1 and #2 transitions from BACKUP to MASTER, the timeout issue does not occur.

Thinking that there is some unknown underlying issues with instance #1, i deleted the instance and cloned instance #2 as #1, reconfigured it accordingly and confirmed that the MASTER/BACKUP status for each instance was correct and as expected.

After logging in to PiHole again on instance #1, the issue represents itself again on #1 after a short period of time. It doesn’t matter whether I access the interface via the direct, or vrrp, IP.

I’m at a point where I’m thinking of building new instances to see if the issue continues or not.

I still think this is related to browser cache or something similar.

Do you access both instances using the same IP? or each instance is accessed using a different IP?

This part sounds like possibly a mismatch of cookies being written by one instance and then read by the other. If you are sharing the same IP via this method it may be necessary to ensure no tabs remain open, then clear the cookie every single time there is a transition from one instance to another, then login again.

Thanks for your response.

I never had this issue prior to upgrading to the latest PiHole release from last week or so.
I went from Core : 6.3 -> 6.4, FTL : 6.5 -> 6.4.1 and Web : 6.4.1 -> 6.4

I thought the issue may have been a cookie issue too on the computer i normally view PiHole from (my dashboard screen), which is a separate Win11 PC, and I cleared the cookies in the Chrome browser on that PC.
I don’t use that PC for anything other than displaying the status tabs of PiHole, my router and a Google calendar. It’s been humming along for months.
Even when I close that browser entirely and use another browser on another PC just to view PiHole, I still get the session timeout.

I think i mentioned it in prior edits/updates, but the issue also occurs regardless of whether I view the interface via instance #1’s direct IP or via the vIP when instance #1 is the MASTER.
And to that, it confuses me when I copy instance #2 and reconfigure the copy as #1, the issue presents itself all over again.

At this time, I have instance #1 shutdown so VRRP has assigned MASTER to instance #2, and it has been up all this time since my last post 12h ago on both my dashboard PC as well as another PC.

It doesn’t matter whether I use the instance’s direct IP or the vIP assigned to it via VRRP. I get the same outcome.

I’ve also responded to Rob Gill giving an explanation of what i’ve done in the interim since originally posting and providing other updates. Instance #2, which is now the vrrp MASTER, hasn’t skipped a beat for 12h now.
Instance #2 is currently viewable via a Chrome browser on two PCs via the vIP address.

Thanks for your response.

I never had this issue prior to upgrading to the latest PiHole release from last week or so.
I went from Core : 6.3 -> 6.4, FTL : 6.5 -> 6.4.1 and Web : 6.4.1 -> 6.4

I thought the issue may have been a cookie issue too on the computer i normally view PiHole from (my dashboard screen), which is a separate Win11 PC, and I cleared the cookies in the Chrome browser on that PC.
I don’t use that PC for anything other than displaying the status tabs of PiHole, my router and a Google calendar. It’s been humming along for months.
Even when I close that browser entirely and use another browser on another PC just to view PiHole, I still get the session timeout.

I think i mentioned it in prior edits/updates, but the issue also occurs regardless of whether I view the interface via instance #1’s direct IP or via the vIP when instance #1 is the MASTER.
And to that, it confuses me when I copy instance #2 and reconfigure the copy as #1, the issue presents itself all over again.

At this time, I have instance #1 shutdown so VRRP has assigned MASTER to instance #2, and it has been up all this time since my last post 12h ago on both my dashboard PC as well as another PC.

OK, so further testing, regardless of computer or browser used …

  1. when instance #1 is the vIP MASTER and the interface is accessed via the vIP address (or DNS entry, the timeout occurs
  2. when instance #1 is the vIP MASTER and the interface is accessed via the instance’s direct IP, the timeout DOES NOT occur
  3. when instance #2 is the vIP MASTER and the interface is accessed via the vIP address (or DNS entry), the timeout DOES NOT occur

Closed the Chrome browser on both computers that i view the interface from and cleared the cache by deleting the Cache folder in %LocalAppData%\Google\Chrome\User Data\.
Repeated the same for Edge (%LocalAppData%\Microsoft\Edge\User Data\) on both computers just for good measure.

Launched Chrome on my dashboard PC only and logged into PiHole via the DNS entry for the vIP address.
Confirmed in Settings > Web Interface/API > Currently Active Sessions that it is the only session showing.

Left logged in and timed out again after ~10 minutes.

Can you please get details of the cookies generated from your scenarios above (all combinations of each instance as vIP MASTER accessed via direct IP, and vIP address), gather each after clearing cookies and cache.

If you have firefox installed, the view is available in More Tools -> Web developer tools -> Storage.

Please list all of the fields in my screenshot but be sure to redact the "SID" fields before posting, and also redact your domain if it is not a generic domain such as .home.arpa or .internal.

1 Like

Is this what you are/were after???

vIP MASTER - vIP address (172.16.200.21)

image

vIP MASTER - direct address

image

Yes, exactly.

For that first one, can you confirm you accessed it via the IP and not by the domain "piholevrrp"?

Sorry for the delay. Didn’t realise you’d responded so quickly after i provided the cookie information.

Accessing via either method resulted in an eventual timeout after several minutes.

Just as another test tonight, i’ve swapped the priority value for keepalived between the two instances and restarted the service on both instances making instance #2 the MASTER and #1 the BACKUP.

Session information from two different computers on my network :

Both sessions are via the piholevrrp domain address.

image

I’ll see how long this session stays up for and report back.

If the issue doesn’t present itself, then i’m lost as to why the timeout only occurs when instance #1 is the MASTER.

OK, so the issue persists across instance #2 when it is the vrrp MASTER.

Not sure how long the session was alive for before it timed out. It’s now 7:00 on 6th March.
Is there a way to find out? Some sort of log somewhere?

I’m going to login to both instances via their direct IP address rather than the vIP address and leave them to see if either/both timeout. I’ll be a work in the meantime, so won’t know if/when it does until I come home later this afternoon.

not even 5 mins and both instances timed out