On Wed, April 1, 2015 9:35 am, Kevin Grittner-5 [via PostgreSQL] wrote: >
> > TonyS <t...@exquisiteimages.com> wrote: > > >> The postgresql log has these entries at the crash point: >> 2015-04-01 06:24:37 EDT LOG: server process (PID 1384) was terminated >> by signal 9: Killed 2015-04-01 06:24:38 EDT DETAIL: Failed process was >> running: analyze verbose; >> > > That was almost certainly the action of the OS's Out Of Memory > Killer process. > > >> Is there anything else that would be helpful? >> > > Unfortunately, leaving the OOM killer enabled causes the best > evidence to be destroyed. If you disable the OOM killer and run this > again, when memory is exhausted the database process attempting to > allocate memory will dump a map of where its memory was allocated. That > should give us something to work with regarding the cause. Try: > > vm.overcommit_memory = 2 vm.overcommit_ratio = 80 > The analyze function has crashed again while the overcommit entries were as above. The last bit of the PostgreSQL log shows: MdSmgr: 41934848 total in 14 blocks; 639936 free (0 chunks); 41294912 used ident parser context: 0 total in 0 blocks; 0 free (0 chunks); 0 used hba parser context: 7168 total in 3 blocks; 2288 free (1 chunks); 4880 used LOCALLOCK hash: 8192 total in 1 blocks; 1680 free (0 chunks); 6512 used Timezones: 83472 total in 2 blocks; 3744 free (0 chunks); 79728 used ErrorContext: 8192 total in 1 blocks; 8160 free (6 chunks); 32 used 2015-04-01 14:23:27 EDT ERROR: out of memory 2015-04-01 14:23:27 EDT DETAIL: Failed on request of size 80. 2015-04-01 14:23:27 EDT STATEMENT: analyze verbose; >From syslog leading up to the crash Apr 1 06:24:37 postgrestest kernel: [26692.691936] [ 1434] 1000 1434 26408 70 53 197 0 sshd Apr 1 06:24:37 postgrestest kernel: [26692.691939] [ 1435] 1000 1435 5593 0 16 452 0 bash Apr 1 06:24:37 postgrestest kernel: [26692.691943] [ 1449] 1000 1449 6204 81 17 31 0 top Apr 1 06:24:37 postgrestest kernel: [26692.691947] Out of memory: Kill process 1384 (postgres) score 790 or sacrifice child Apr 1 06:24:37 postgrestest kernel: [26692.693667] Killed process 1384 (postgres) total-vm:10044764kB, anon-rss:6963780kB, file-rss:202916kB Apr 1 06:25:02 postgrestest CRON[1755]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )) -- View this message in context: http://postgresql.nabble.com/Would-like-to-know-how-analyze-works-technically-tp5844197p5844335.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.