แก้ปัญหา Start PostgreSQL ไม่ได้
เจอ Error
could not create shared memory segment: Invalid argument
แก้ปัญหา Start PostgreSQL ไม่ได้ เจอ Error could not create shared memory segment: Invalid argument
Moderators: mindphp, ผู้ดูแลกระดาน
- mindphp
- ผู้ดูแลระบบ MindPHP
- Posts: 27195
- Joined: 22/09/2008 6:18 pm
- Contact:
แก้ปัญหา 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
- Posts: 27195
- Joined: 22/09/2008 6:18 pm
- Contact:
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
- Posts: 27195
- Joined: 22/09/2008 6:18 pm
- Contact:
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
เช่น
Code: Select all
nano /etc/postgresql/9.1/main/postgresql.conf
shared_buffers = 128MB #24MB
สำหรับเครื่อง ram 1-2 GB
เติมค่า
Code: Select all
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
- Replies
- Views
- Last post
-
- 1 Replies
- 660 Views
-
Last post by mindphp
19/04/2017 5:34 am
-
-
แก้ปัญหา ลบฐานข้อมูลใน PostgreSQL ด้วยคำสั่ง dropdb ไม่ได้
by mindphp » 13/10/2017 9:10 pm » in PostgreSQL - 1 Replies
- 2291 Views
-
Last post by mindphp
13/10/2017 9:11 pm
-
-
-
เเจ้ง error "Invalid argument supplied for foreach()"
by thatsawan » 23/06/2014 9:22 pm » in Programming - PHP - 4 Replies
- 2146 Views
-
Last post by thatsawan
25/06/2014 12:09 pm
-
-
-
ผมกำลังจะ start services postgreSQL เจอ error ระบบประฏิบัติการ windows
by nuattawoot » 02/08/2017 11:08 pm » in SQL - Database - 1 Replies
- 913 Views
-
Last post by mindphp
03/08/2017 7:10 am
-
-
- 0 Replies
- 2313 Views
-
Last post by mindphp
30/07/2017 9:56 pm
-
- 1 Replies
- 453 Views
-
Last post by mindphp
13/02/2017 9:53 pm
-
- 2 Replies
- 234 Views
-
Last post by mindphp
13/11/2020 1:38 am
Who is online
Users browsing this forum: No registered users and 4 guests