Loading...
 
[Zobrazit/Skrýt nabídky vlevo]
[Zobrazit/Skrýt nabídky vpravo]

Shared memory problem

When you come across the following error while starting up PostgreSQL, you shall change the following sysctl parameters.

2015-12-09 10:27:55.997 CET >FATAL:  could not create shared memory segment: Invalid argument
Dec  9 10:27:55 php-webhosting postgres[13200]: [1-2] < 2015-12-09 10:27:55.997 CET >DETAIL:  Failed system call was shmget(key=5432001, size=147783680, 03600).
Dec  9 10:27:55 php-webhosting postgres[13200]: [1-3] < 2015-12-09 10:27:55.997 CET >HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 147783680 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.


This error occurs when trying to start PostgreSQL 9.2 up inside a VZ container. You must adjust SHM related sysctl arguments in /etc/sysctl.conf. The following values are sufficient for 128MB PostgreSQL share_buffers settings.

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 1073741824

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 1048576

Created by dfabian. Last Modification: Středa 09 of prosinec, 2015 15:49:24 CET by dfabian.