pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ludwig Isaac Lim <ludz_lim@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-admin@postgresql.org>
Subject: Re: Stuck Spinlock Error Message
Date: Tue, 05 Aug 2003 15:56:22 -0400
Message-ID: <12041.1060113382@sss.pgh.pa.us> (raw)
In-Reply-To: <20030805035512.67568.qmail@web21603.mail.yahoo.com>
References: <20030805035512.67568.qmail@web21603.mail.yahoo.com>

Ludwig Isaac Lim <ludz_lim@yahoo.com> writes:
>    I'm guessing that the spinlock error occurs after
> there are around hundreds (or thousands) of queued
> postmaster processes.

Thousands?  How large is your max_connections parameter, anyway
(and do you really have big enough iron to support it)?

The stuck spinlock error implies that some work that should have
taken a fraction of a microsecond (namely the time to check and update
the internal state of an LWLock structure) took upwards of a minute.

Since the process holding the spinlock could lose the CPU, it's
certainly physically possible for the actual duration of holding the
spinlock to be much more than a microsecond.  But the odds of losing
the CPU while holding the spinlock are not large, since it's held for
just a small number of instructions.  And to get an actual "stuck
spinlock" failure would imply that the holding process didn't get
scheduled again for more than a minute (while some other process that
wanted the spinlock *did* get scheduled again --- repeatedly).  I
suppose this is possible if your machine is sufficiently badly
overloaded.

			regards, tom lane



view thread (5+ messages)

Message-ID: <12041.1060113382@sss.pgh.pa.us>
Permalink:  ../12041.1060113382@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12041.1060113382@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ludz_lim@yahoo.com
  Subject: Re: Stuck Spinlock Error Message
  In-Reply-To: <12041.1060113382@sss.pgh.pa.us>
  References: <20030805035512.67568.qmail@web21603.mail.yahoo.com> <12041.1060113382@sss.pgh.pa.us>

* 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