Re: Postgresql suddenly shutdown. Please help

From: Juan Miguel <juanmime(at)ono(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Postgresql suddenly shutdown. Please help
Date: 2003-05-15 21:01:03
Message-ID: 200305152301.03923.juanmime@ono.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> Is a good idea to see if any process in the machine is increasing it's
> memory, because it can have nothing to do with postgres. It happened to me.
> I was running a application that was sending output to initlog, so initlog
> was incresing of memory.
> After a few days de machine was out of memory and some processes were
> killed (the postmaster process was allways killed).
>

I don't know, but the server instalation is one of the default installations
given in Red Hat 8. I have only compiled and installed postgres

How can I check the memory used by each process, or log the usage of memory
when the system needs to kill processes for freeing space ?

Thanks.

> Raquel
>
> On Thursday 15 May 2003 14:34, Juan Miguel wrote:
> > Hello,
> >
> > First about my english,
> >
> > I have a server (Dual Petium IV Xeon 2Ghz, 512 MB RAM, 64 GB SCSI HD) in
> > Linux RH 8.0, using Postgresql 7.3, compiled from the sources.
> >
> > Well, I have detected two times that the sever after runing about 40 or
> > 50 days, the postgres database server die.
> >
> > The second time that the database died, when I turned on the monitor, I
> > saw on the login text screen some messages like these:
> >
> > Out of Memory: killed process 20003 (postmaster)
> > ...
> > ... (idem)
> > ...
> > Out of Memory: killed process 1055 (http)
> > ...
> >
> >
> > I think that the system is "out of memory", and is killing processes, for
> > freeing memory... Therefore postgres die. I say that this is what i
> > suppose, but, why ?
> >
> > I think that this high memory hungry, could be relationed with postgres.
> > In the 40-50 days that postgres lives, I have to say that I've never do a
> > manual vacuum, because the server is so far away and I don't trust in
> > automatic vacuum that could be lock until all transactions end.
> >
> > Here are, a bit of the "serverlog" and "postgresql.conf" files:
> >
> > ================================================
> > tail -40 serverlog
> > ================================================
> > LOG: statistics collector process (pid 2672) was terminated by signal 9
> > LOG: statistics collector process (pid 2674) was terminated by signal 9
> > LOG: statistics collector process (pid 2677) was terminated by signal 9
> > LOG: statistics collector process (pid 2680) was terminated by signal 9
> > LOG: statistics collector process (pid 2682) was terminated by signal 9
> > LOG: statistics collector process (pid 2685) was terminated by signal 9
> > LOG: statistics collector process (pid 2687) was terminated by signal 9
> > LOG: statistics collector process (pid 2690) was terminated by signal 9
> > LOG: server process (pid 2676) was terminated by signal 9
> > LOG: terminating any other active server processes
> > WARNING: Message from PostgreSQL backend:
> > The Postmaster has informed me that some other backend
> > died abnormally and possibly corrupted shared memory.
> > I have rolled back the current transaction and am
> > going to terminate your database system connection and exit.
> > Please reconnect to the database system and repeat your query.
> > LOG: statistics collector process (pid 2692) was terminated by signal 9
> > LOG: statistics collector process (pid 2694) was terminated by signal 9
> > FATAL: The database system is in recovery mode
> > LOG: statistics collector process (pid 2697) was terminated by signal 9
> > LOG: statistics collector process (pid 2700) was terminated by signal 9
> > FATAL: The database system is in recovery mode
> > LOG: statistics collector process (pid 2702) was terminated by signal 9
> > LOG: statistics collector process (pid 2704) was terminated by signal 9
> > LOG: statistics collector process (pid 2706) was terminated by signal 9
> > LOG: all server processes terminated; reinitializing shared memory and
> > semaphores
> > LOG: statistics collector process (pid 2708) was terminated by signal 9
> > LOG: startup process (pid 2710) was terminated by signal 9
> > LOG: aborting startup due to startup process failure
> > LOG: database system was interrupted at 2003-05-15 09:39:04 CEST
> > LOG: checkpoint record is at 0/244C2B84
> > LOG: redo record is at 0/244C2B84; undo record is at 0/0; shutdown TRUE
> > LOG: next transaction id: 20147; next oid: 119397
> > LOG: database system was not properly shut down; automatic recovery in
> > progress
> > LOG: ReadRecord: record with zero length at 0/244C2BC4
> > LOG: redo is not required
> > LOG: database system is ready
> > LOG: fast shutdown request
> > LOG: shutting down
> > LOG: database system is shut down
> >
> > ================================================
> > postgresql.conf
> > ================================================
> > #
> > # Connection Parameters
> > #
> > #tcpip_socket = false
> > #ssl = false
> >
> > max_connections = 128
> > #superuser_reserved_connections = 2
> >
> > #port = 5432
> > #hostname_lookup = false
> > #show_source_port = false
> >
> > #unix_socket_directory = ''
> > #unix_socket_group = ''
> > #unix_socket_permissions = 0777 # octal
> >
> > #virtual_host = ''
> >
> > #krb_server_keyfile = ''
> >
> >
> > #
> > # Shared Memory Size
> > #
> > shared_buffers = 1024 # 2*max_connections, min 16, typically 8KB
> > each #max_fsm_relations = 100 # min 10, fsm is free space map, ~40
> > bytes #max_fsm_pages = 10000 # min 1000, fsm is free space map, ~6
> > bytes #max_locks_per_transaction = 64 # min 10
> > wal_buffers = 8 # min 4, typically 8KB each
> >
> > #
> > # Non-shared Memory Sizes
> > #
> > sort_mem = 8192 # min 64, size in KB
> > #vacuum_mem = 8192 # min 1024, size in KB
> >
> > ==========================================================
> >
> >
> > Please, how can I resolve this problem ? Why postgres shuts down ?
> >
> > Thanks very much.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message timeless postgres 2003-05-15 21:31:23 Silicon Valley PostgreSQL Position
Previous Message Stephan Szabo 2003-05-15 18:20:32 Re: qestion