แก้ปัญหา Start PostgreSQL ไม่ได้
เจอ Error
could not create shared memory segment: Invalid argument
แก้ปัญหา Start PostgreSQL ไม่ได้ เจอ Error could not create shared memory segment: Invalid argument
Moderator: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41360
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
แก้ปัญหา Start PostgreSQL ไม่ได้ เจอ Error could not create shared memory segment: Invalid argument
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41360
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: แก้ปัญหา Start PostgreSQL ไม่ได้ เจอ Error could not create shared memory segment: Invalid argument
ลอง restart เจอ Error ประมาณ นี้
sudo service postgresql restart
* Restarting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2018-02-08 18:42:36 ICT FATAL: could not create shared memory segment: Invalid argument
2018-02-08 18:42:36 ICT DETAIL: Failed system call was shmget(key=5678001, size=288940032, 03600).
2018-02-08 18:42:36 ICT 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 288940032 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
sudo service postgresql restart
* Restarting PostgreSQL 9.1 database server * The PostgreSQL server failed to start. Please check the log output:
2018-02-08 18:42:36 ICT FATAL: could not create shared memory segment: Invalid argument
2018-02-08 18:42:36 ICT DETAIL: Failed system call was shmget(key=5678001, size=288940032, 03600).
2018-02-08 18:42:36 ICT 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 288940032 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
The PostgreSQL documentation contains more information about shared memory configuration.
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
- mindphp
- ผู้ดูแลระบบ MindPHP
- โพสต์: 41360
- ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
- ติดต่อ:
Re: แก้ปัญหา Start PostgreSQL ไม่ได้ เจอ Error could not create shared memory segment: Invalid argument
ปัญหามาจาก การตั้งค่า shared memory มากเกินไป
วิธีแก้
nano /etc/postgresql/[pgsqql เวอร์ชั่น]/main/postgresql.conf
เช่น
แก้
shared_buffers = 128MB #24MB
สำหรับเครื่อง ram 1-2 GB
เติมค่า
วิธีแก้
nano /etc/postgresql/[pgsqql เวอร์ชั่น]/main/postgresql.conf
เช่น
โค้ด: เลือกทั้งหมด
nano /etc/postgresql/9.1/main/postgresql.conf
shared_buffers = 128MB #24MB
สำหรับเครื่อง ram 1-2 GB
เติมค่า
โค้ด: เลือกทั้งหมด
sysctl -w kernel.shmmax=134217728
$ sysctl -w kernel.shmall=2097152
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
-
โพสต์ใหม่ เเจ้ง error "Invalid argument supplied for foreach()"
โดย thatsawan » 23/06/2014 9:22 pm » ใน Programming - PHP - 4 ตอบกลับ
- 12626 แสดง
-
โพสต์ล่าสุด โดย thatsawan
25/06/2014 12:09 pm
-
-
-
โพสต์ใหม่ ผมกำลังจะ start services postgreSQL เจอ error ระบบประฏิบัติการ windows
โดย nuattawoot » 02/08/2017 11:08 pm » ใน SQL - Database - 1 ตอบกลับ
- 1647 แสดง
-
โพสต์ล่าสุด โดย mindphp
03/08/2017 7:10 am
-
-
-
โพสต์ใหม่ PostgreSQL : คำสั่ง SQL การ Create Table AS
โดย thitikorn_lp » 07/08/2014 4:14 pm » ใน PostgreSQL - 0 ตอบกลับ
- 2469 แสดง
-
โพสต์ล่าสุด โดย thitikorn_lp
07/08/2014 4:14 pm
-
-
-
โพสต์ใหม่ PostgreSQL : คำสั่ง SQL การ Create Database
โดย thitikorn_lp » 05/08/2014 5:03 pm » ใน PostgreSQL - 0 ตอบกลับ
- 2748 แสดง
-
โพสต์ล่าสุด โดย thitikorn_lp
05/08/2014 5:03 pm
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 67