Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using all Api seats #43

Open
buccaneeruk opened this issue Feb 27, 2025 · 2 comments
Open

Using all Api seats #43

buccaneeruk opened this issue Feb 27, 2025 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@buccaneeruk
Copy link

Great producr got it syncing 2 v6 Pi-holes.

Problem is it uses api seats on Primary , and does not release once used so very quicly you get the logon error issue of

Image

@PhilThurston
Copy link

By default the amount of api seats is 16 if I'm seeing things right. This app specifically logs out after each request so it shouldn't be taking up any of the api seats other than 1 during it's initial run. You may have another program or script that is opening connections and not closing them. That would be my guess. You can increase the amount of seats via webserver.api.max_sessions but it won't solve your issue just make it worse.

If you have no other scripts or programs running that make use of the pihole api I would suggest you track down how this is running and what's between it. Since the application properly handles connections there's possibly something else in between that is not allowing the sessions to be properly closed. You can know that this app is working properly because you'll see a INF Invalidating sessions... message in your logs when it revokes the seat in your Pihole.

@lovelaze
Copy link
Owner

lovelaze commented Mar 1, 2025

This app specifically logs out after each request so it shouldn't be taking up any of the api seats other than 1 during it's initial run.

This is correct, although there is a flaw in the implementation.

It will always try to invalidate sessions at the end after the syncing, and if the sync fails (for any reason) it probably just exits without invalidating the sessions. So, this should be changed so that it always at least attempts to invalidate the authenticated session regardless of what happens during the sync.

@lovelaze lovelaze added bug Something isn't working enhancement New feature or request labels Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants