pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: spiral <spiral@spiral.sh>
To: Adam Scott <adam.c.scott@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: weird issue with occasional stuck queries
Date: Sat, 2 Apr 2022 08:23:39 -0400
Message-ID: <20220402082339.76e712d3@xps> (raw)
In-Reply-To: <CA+s62-MExP8HqTsdddbsSXNLHBRD0ABR81fJQ8zJnDMeQyVMug@mail.gmail.com>
References: <20220401030646.4eaad5a4@xps>
	<CA+s62-MExP8HqTsdddbsSXNLHBRD0ABR81fJQ8zJnDMeQyVMug@mail.gmail.com>

Hey,

> That wait event according to documentation is "Waiting to access the
> multixact member SLRU cache."  SLRU = segmented least recently used
> cache

I see, thanks!

> if you are low on memory, it can slow down the allocation of
> buffers. Do you have a query that is a "select for update" running
> somewhere? If your disk is low on space `df -h` that might explain
> the issue.

- There aren't any queries that are running for longer than the selects
shown earlier; definitely not "select for update" since I don't ever
use that in my code.
- Both disk and RAM utilization is relatively low.

> Is there an ERROR: multixact  something in your postgres log?

There isn't, but while checking I saw some other concerning errors
including "deadlock detected", "could not map dynamic shared memory
segment" and "could not attach to dynamic shared area".
(full logs here: https://paste.sr.ht/blob/9ced99b119c3fce1ecfd71e8554946e7845a44dd )

> Another thing to look at is `iostat -x -y` and look at disk util %.
> This is an indicator, but not definitive, of how much disk access is
> going on.  It may be your drives are just saturated although your
> IOWait looks ok in your attachment.

I didn't specifically look at that, but I did notice *very* high disk
utilization in at least one instance of the stuck queries, as I
mentioned previously. Why would the disks be getting saturated? The
query count isn't noticeably higher than average, and the database
is not autovacuuming, so not sure what could cause that.

spiral





view thread (5+ messages)  latest in thread

Message-ID: <20220402082339.76e712d3@xps>
Permalink:  ../20220402082339.76e712d3@xps/
Also on:    postgresql.org/message-id/20220402082339.76e712d3@xps

 · 

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 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: spiral@spiral.sh, adam.c.scott@gmail.com
  Subject: Re: weird issue with occasional stuck queries
  In-Reply-To: <20220402082339.76e712d3@xps>
  References: <20220401030646.4eaad5a4@xps> <CA+s62-MExP8HqTsdddbsSXNLHBRD0ABR81fJQ8zJnDMeQyVMug@mail.gmail.com> <20220402082339.76e712d3@xps>

* 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