Re: Stuck Spinlock Error Message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ludwig Isaac Lim <ludz_lim(at)yahoo(dot)com>
Cc: PostgreSQL Mailing List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Stuck Spinlock Error Message
Date: 2003-08-05 19:56:22
Message-ID: 12041.1060113382@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Ludwig Isaac Lim <ludz_lim(at)yahoo(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Arthur Ward 2003-08-06 08:59:09 Re: syslog enabled causes random hangs?
Previous Message Reuben D. Budiardja 2003-08-05 14:22:51 Re: Fatal error: Call to undefined function: pg_connect()