Getting OOM errors from PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my log I have been getting errors that look like this:
LOG:  could not fork new process for connection: Cannot allocate memory

This seems to only happen during periods of high activity. Shortly after the last one occurred I checked the free mem and got this:
# free -h
              total        used        free      shared  buff/cache   available
Mem:           9.4G        737M        283M        2.1G        8.4G        6.3G
Swap:          2.0G        8.3M        2.0G

>From this I see the vast majority of the 10GB of memory is being used by the OS cache. If I understand how it works correctly, this means it is basically free memory because if an application needs it the kernel will free some of it for use... is my understanding correct?

Here are the memory-related settings I am using:

max_connections = 50
shared_buffers = 2000MB
maintenance_work_mem = 500MB
autovacuum_work_mem = 500MB
work_mem = 50MB
temp_buffers = 16MB

Can anyone help me determine what is causing postgresql to be unable to fork a new process because it can't allocate memory?

Chris


-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux