public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: Wilhelm Wurzer <[email protected]>
Cc: [email protected]
Subject: Re: pgadmin healthcheck-url
Date: Tue, 27 Mar 2018 17:21:56 +0530
Message-ID: <CAKKotZQD-S0FXzEPgbuOuTJdT-yeEUgS+fs5SdyWXom__sEEQQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

You can use '/misc/ping' route to check if pgAdmin4 is running.

Example: http://localhost:5050/misc/ping

On Success you will get,
Status code: 200
Response text: PING


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Tue, Mar 27, 2018 at 5:14 PM, Wilhelm Wurzer <[email protected]>
wrote:

> 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
>
>


view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: pgadmin healthcheck-url
  In-Reply-To: <CAKKotZQD-S0FXzEPgbuOuTJdT-yeEUgS+fs5SdyWXom__sEEQQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox