Re: Stuck Spinlock Error Message - Mailing list pgsql-admin

From Tom Lane
Subject Re: Stuck Spinlock Error Message
Date
Msg-id 12041.1060113382@sss.pgh.pa.us
Whole thread Raw
In response to Re: Stuck Spinlock Error Message  (Ludwig Isaac Lim <ludz_lim@yahoo.com>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: "Cornelia Boenigk"
Date:
Subject: Re: [GENERAL] Fatal error: Call to undefined function: pg_connect()
Next
From: "Arthur Ward"
Date:
Subject: Re: syslog enabled causes random hangs?