pgadmin healthcheck-url

From: Wilhelm Wurzer <wilhelm(dot)wurzer(at)twyn(dot)com>
To: pgadmin-hackers(at)lists(dot)postgresql(dot)org
Subject: pgadmin healthcheck-url
Date: 2018-03-27 11:44:23
Message-ID: 96167950.2563944.1522151063432.JavaMail.zimbra@connexgroup.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

we are using pgadmin in a docker container on aws. To ensure that the container is up and running, a healthcheck is periodically checking via http, restarting the container if neccessary.

When checking the filesystem, we found that for each request, a session file is created. Healthcheck is done twice every 30secs, so we have about 5600 session files a day. (about 100k after a few days..)

I looked at the sourcecode and found that in session.py, line 259 it looks like cookies should not be created for static resources

-

def open_session(self, app, request):
cookie_val = request.cookies.get(app.session_cookie_name)

if not cookie_val or '!' not in cookie_val:
# Don't bother creating a cookie for static resources
for sp in self.skip_paths:
if request.path.startswith(sp):
return None

-

unfortunately, in __init__.py, when setting up the session interface, skip_paths is empty and so a cookie gets created also for static resources (i'm no python hacker, so maybe i'm missing something)

So my question is - is there an url that can be used for healthchecking, that does not create a session file on every check ?

thanks a lot,

Wilhelm Wurzer
twyn group GmbH

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Murtuza Zabuawala 2018-03-27 11:51:56 Re: pgadmin healthcheck-url
Previous Message Murtuza Zabuawala 2018-03-27 10:25:18 Re: [pgAdmin4][RM#3055] Allow user to sort the data in View data mode