From: Julien Rouhaud <rjuju123@gmail.com>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Help understanding server-side logging (and more...)
Date: Thu, 21 Dec 2023 12:55:55 +0100
Message-ID: <ZYQny-0c4VcZp_Re@jrouhaud> (raw)
In-Reply-To: <CAFCRh-_72x=8S1T5YXgJFmz8j6WKYViORqF-ndbFBesf4kAjNQ@mail.gmail.com>
References: <CAFCRh-_72x=8S1T5YXgJFmz8j6WKYViORqF-ndbFBesf4kAjNQ@mail.gmail.com>
Hi,
On Thu, Dec 21, 2023 at 12:05:41PM +0100, Dominique Devienne wrote:
> Hi. Another team (than mine) has been trying to troubleshoot hang issues in
> their Node/JS/TS-based mid-tier services,
> after a switch from MySQL to PostgreSQL. They run PostgreSQL in a Linux
> container (see PID [1] below), unlike us.
> They started looking at the PostgreSQL server-side logs, but with little to
> no experience reading them, we'd like to
> confirm the extract below looks normal, notably whether the various
> exit-related messages are OK or not.
All those messages are at DEBUG level. Anything abnormal would be emitted at a
higher level.
>
>
> FWIW, the symptoms they are experiencing is that initially all queries are
> fast, then they start to get longer and longer,
> to the point all services accessing PostgreSQL grind to a halt and
> basically hang. While that happens, one can connect
> to the DB from a shell (that cluster has a single DB) w/o issues, and run
> queries just fine (they have little data,
> in the few dozens MBs spread in 2 schemas and probably 2 or 3 dozen tables
> max), thus I personally think the problem
> is more on the client Node.JS side, but given that the same code worked
> fine with MySQL, maybe I'm wrong.
Yeah, "everything works normally except inside the app" is usually a good
indication that it's unlikely to be a postgres problem. Maybe they have some
locking issue, transactions that are opened for too long or something else but
it's impossible to say without much more information. One sure thing is that
running with logs at DEBUG level is going to add noticeable overhead.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rjuju123@gmail.com, ddevienne@gmail.com
Subject: Re: Help understanding server-side logging (and more...)
In-Reply-To: <ZYQny-0c4VcZp_Re@jrouhaud>
References: <CAFCRh-_72x=8S1T5YXgJFmz8j6WKYViORqF-ndbFBesf4kAjNQ@mail.gmail.com> <ZYQny-0c4VcZp_Re@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox