เจอปัญหานี้บ่อย สำหรับ app ที่อยู่บน pgsql เยอะๆ psql: FATAL: too many connections for role "user_name".
โพสต์แล้ว: 17/01/2018 4:50 am
ปัญหา psql: FATAL: too many connections for role "user_name".
ปัญหามาจาก การตั้ง config ของ postgresql ไว้น้อยเกินไป
ทางแก้คือปรับ config ทำได้ตังนี้
สำหรับ Ubuntu
ปรับเติม max_connection และ shared_buffers
แก้ไขไฟล์
ปรับเพิ่ม max_connection, shared_buffers ตามความเหมาะสมของ Server เรา
เสร็จแล้ว restart postgresql
ปัญหามาจาก การตั้ง config ของ postgresql ไว้น้อยเกินไป
ทางแก้คือปรับ config ทำได้ตังนี้
สำหรับ Ubuntu
ปรับเติม max_connection และ shared_buffers
แก้ไขไฟล์
โค้ด: เลือกทั้งหมด
/etc/postgresql/9.3/main/postgresql.conf
เสร็จแล้ว restart postgresql
โค้ด: เลือกทั้งหมด
sudo service postgresql restart