Re: Unable to connect. Log : PDTWARNING: worker took too long to start; canceled

Поиск
Список
Период
Сортировка
От Linus Kamb
Тема Re: Unable to connect. Log : PDTWARNING: worker took too long to start; canceled
Дата
Msg-id CAPWLyu3_VAkvKWGhD0jRs6Ba1q7GSYGn_10-DD=XBtd4m8Dovg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unable to connect. Log : PDTWARNING: worker took too long to start; canceled  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-admin
Thanks for the response - and explanation of those emails.  I was somewhat surprised that there were no further discussions of that issue in the archives and that it would be left hanging like that.  And then further confused by the receipt of those old emails!

I have killed and restarted postgres, so I will have to wait a day, I suppose, to see if it hangs again.

I was no where near the connection limit, however, so it wasn't that.  And I didn't have all those dead postmaster processes.

Interestingly (maybe), when I did a ps when it was hung, there was NO postmaster process, just a postgres process.

I believe when I restarted yesterday, I used the pg_ctl start command.

Today I used the OSX launchctl start command (what would happen at reboot), and now I DO see a postmaster process.

  642 72833     1   0  9:34AM ??         0:00.23 /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
  642 72837 72833   0  9:34AM ??         0:00.10 postgres: logger process     
  642 72839 72833   0  9:34AM ??         0:00.43 postgres: writer process     
  642 72840 72833   0  9:34AM ??         0:00.31 postgres: wal writer process     
  642 72841 72833   0  9:34AM ??         0:00.11 postgres: autovacuum launcher process     
  642 72842 72833   0  9:34AM ??         0:00.17 postgres: stats collector process     
  642 72860 72833   0  9:35AM ??         0:00.18 postgres: postgres postgres ::1(54138) idle  
  642 72861 72833   0  9:35AM ??         0:00.06 postgres: postgres test ::1(54139) idle  

I have also temporarily disabled the glassfish thread pool that was connecting to the database.

I will continue to try to isolate a (possible) cause.

thanks for your help,
Linus



On Wed, Oct 23, 2013 at 10:37 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Linus Kamb escribió:
> Hi,
>
> Every morning for the past several days, when I come in to work, I find the
> postgres process running at 100% CPU and the logs filled with entries every
> minute with the warning "PDTWARNING:  worker took too long to start;
> canceled"
>
> This appears to be almost exactly as this other thread:
>
> http://www.postgresql.org/message-id/AANLkTimt7_wbadtOkM9HqzeHmADmxb2TvuQD5yBUwkdZ@mail.gmail.com

I noticed that the thread was missing a couple of emails in the
archives, and that I had them in my mbox.  I have just forwarded them
("bounced" them in mutt's terms) to the list and I think the archive is
complete now for that thread; I apologize to subscribers that just
received a couple of very old emails.

Anyway, that thread died without finding the root cause of the problem,
but Tom suspected that postmaster was being kept busy doing something
that precluded it from running its usual tasks.  For the OP of the other
thread, stracing the postmaster seemed to bring it back to normal life.

Would it be possible to attach to the postmaster with GDB and get a
stack trace when it's stuck?  That might be helpful; or, if the mere act
of tracing it brings it back to life, it might not -- but instead it
would make me think it's a platform bug of some sort.

If you remove the Glassfish thing, does the problem go away?

(Note: the PDTWARNING thing happens because you don't have a white space
at the end of your log_line_prefix.  Adding one does wonders for
readability.)

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

В списке pgsql-admin по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Unable to connect. Log : PDTWARNING: worker took too long to start; canceled
Следующее
От: "Ginepro, Raymond C"
Дата:
Сообщение: wrong size archive file