pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dzmitry <dzmitry.nikitsin@gmail.com>
To: pgsql-admin@postgresql.org
Subject: postgres crashes on insert in 40 different threads
Date: Mon, 19 Aug 2013 11:07:12 +0300
Message-ID: <CE37ACE0.116CA%dzmitry.nikitsin@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Hey folks, 
 I have postgres server running on ubuntu 12, Intel Xeon 8 CPUs 29 GB RAM.
With following settings:
max_connections = 550
shared_buffers = 12GB
temp_buffers = 8MB
max_prepared_transactions = 0
work_mem = 50MB
maintenance_work_mem = 1GB
fsync = on
wal_buffers = 16MB
commit_delay = 50  
commit_siblings = 7
checkpoint_segments = 32
checkpoint_completion_target = 0.9
effective_cache_size = 22GB
autovacuum = on
autovacuum_vacuum_threshold = 1800
autovacuum_analyze_threshold = 900

I am doing a lot of writes to DB in 40 different threads ­ so every thread
check if record exists ­ if not => insert record, if exists => update
record. 
During this update, my disk IO almost always ­ 100% and sometimes it crash
my DB with following message:

2013-08-19 03:18:00 UTC LOG:  checkpointer process (PID 28354) was
terminated by signal 9: Killed
2013-08-19 03:18:00 UTC LOG:  terminating any other active server processes
2013-08-19 03:18:00 UTC WARNING:  terminating connection because of crash of
another server process
2013-08-19 03:18:00 UTC DETAIL:  The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2013-08-19 03:18:00 UTC HINT:  In a moment you should be able to reconnect
to the database and repeat your command.
2013-08-19 03:18:00 UTC WARNING:  terminating connection because of crash of
another server process
2013-08-19 03:18:00 UTC DETAIL:  The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.
2013-08-19 03:18:00 UTC HINT:  In a moment you should be able to reconnect
to the database and repeat your command.
2013-08-19 03:18:00 UTC WARNING:  terminating connection because of crash of
another server process
2013-08-19 03:18:00 UTC DETAIL:  The postmaster has commanded this server
process to roll back the current transaction and exit, because another
server process exited abnormally and possibly corrupted shared memory.

My DB size is not very big ­ 169GB.

Anyone know how can I get rid of DB crash  ?


Thanks,
  Dzmitry

view thread (21+ messages)  latest in thread

Message-ID: <CE37ACE0.116CA%dzmitry.nikitsin@gmail.com>
Permalink:  ../CE37ACE0.116CA%25dzmitry.nikitsin@gmail.com/
Also on:    postgresql.org/message-id/CE37ACE0.116CA%dzmitry.nikitsin@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: dzmitry.nikitsin@gmail.com
  Subject: Re: postgres crashes on insert in 40 different threads
  In-Reply-To: <CE37ACE0.116CA%dzmitry.nikitsin@gmail.com>

* 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