pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpreventing the effective fork bomb when restarting a high traffic server?
2+ messages / 2 participants
[nested] [flat]
* preventing the effective fork bomb when restarting a high traffic server?
@ 2004-12-13 19:24 Jeff <threshar@torgo.978.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jeff @ 2004-12-13 19:24 UTC (permalink / raw)
To: pgsql-admin
I have a PG server that handles a pretty good amount of traffic.
Typically the connections are going through pgpool, which is a godsend.
The problem I'm encountering is when I restart PG for whatever reason
it takes it a long time to come back fully online: the reason: the
machine is dealing with over 100 connection attempts / second while
trying to replay the logical logs. (And they are always getting the
"system is coming up" message) (The connection attempts are all from
the pools trying to reconnect up)
Someone on irc suggested perhaps altering pg_hba to disallow
connections from my frontends while it comes back. I haven't done any
tests on this yet but was wondering if anybody else has had this
experience.
if this isn't the case perhaps it may make sense to delay the creation
of the sockets until after log replay is done. (Afterall, the db is
useless until this happens).
--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: preventing the effective fork bomb when restarting a high traffic server?
@ 2004-12-13 22:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: Jeff <threshar@torgo.978.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-12-13 22:18 UTC (permalink / raw)
To: Jeff <threshar@torgo.978.org>; +Cc: pgsql-admin
Jeff <threshar@torgo.978.org> writes:
> The problem I'm encountering is when I restart PG for whatever reason
> it takes it a long time to come back fully online: the reason: the
> machine is dealing with over 100 connection attempts / second while
> trying to replay the logical logs.
Um, perhaps you should allow the database to shut down normally, instead
of kill -9 or whatever you're using? There should not be any log
replay needed after an ordinary restart.
In any case, I think the best solution would be to fix your frontends to
wait a little bit between connection attempts...
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-12-13 22:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-12-13 19:24 preventing the effective fork bomb when restarting a high traffic server? Jeff <threshar@torgo.978.org>
2004-12-13 22:18 ` Tom Lane <tgl@sss.pgh.pa.us>
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