Обсуждение: WARNING: out of shared memory

Поиск
Список
Период
Сортировка

WARNING: out of shared memory

От
"dbyzaa@163.com"
Дата:
hello
    when i try to run a function, i found some message in pg_log
WARNING:  out of shared memory
CONTEXT:  PL/pgSQL function arith.test(character,character,character,integer,character) line 89 at FETCH
SQL statement "select a.p_train_no                   from arith.CJ30_train_code(
v_ns_train_date,v_c_train_no ,v_single_assign_station,0,'') as a"
PL/pgSQL function arith.test(integer,character varying,character varying,integer,character,character) line 1043 at SQL statement
WARNING:  out of shared memory
CONTEXT:  PL/pgSQL function arith.test2(character,character,character,integer,character) line 89 at FETCH

environment:
redhalt 6.2
PostgreSQL 9.6.0 
mem:24GB

sysctl.conf
kernel.shmmax = 12884901888
kernel.shmall = 4718592
vm.swappiness = 0
vm.overcommit_memory = 2
vm.overcommit_ratio = 80
vm.dirty_ratio = 10
vm.dirty_background_ratio = 1
vm.vfs_cache_pressure=150
vm.dirty_writeback_centisecs = 50
net.ipv4.tcp_tw_recycle=1
net.ipv4.tcp_tw_reuse=1
vm.nr_hugepages=2300

postgresql.conf
shared_buffers = 4GB # min 128kB
huge_pages = on # on, off, or try
work_mem = 64MB # min 64kB
maintenance_work_mem = 512MB # min 1MB
max_stack_depth = 8MB # min 100kB
dynamic_shared_memory_type = posix # the default is the first option

dbyzaa@163.com

Re: WARNING: out of shared memory

От
"Hunley, Douglas"
Дата:

On Sat, Oct 22, 2016 at 1:43 AM, dbyzaa@163.com <dbyzaa@163.com> wrote:
kernel.shmmax = 12884901888
kernel.shmall = 4718592

Check the 'ulimit' for the postgres user and ensure it can allocate everything it needs?


--
{
  "name" : "douglas j hunley",
  "email" : "douglas.hunley@openscg.com",
  "title" : "database engineer",
  "phone" : "+1 732 339 3419 x163"
}