Posts Tagged ‘too many connections error’

How to update the max_connections in MySQL

ปัญหาการเกิด error “too many connections” ในขณะที่ query database อยู่ เกิดจากจำนวน connections ที่เข้ามาติดต่อ database มีจำนวนมากกว่าที่ max_connections ได้กำหนดไว้ ซึ่งโดยปกติแล้ว MySQL จะยอมให้มีจำนวน connections ได้เท่ากับ max_connections+1 โดยที่ max_connections คือ จำนวน connections ที่มากที่สุดที่อนุญาต และ +1 คือ connection ของ super user ค่า default ของ max_connections สำหรับ version ที่ต่ำกว่า 5.1.15 จะเท่ากับ 100 connections ถ้าสูงกว่ามีค่าเท่ากับ 151 connections และค่าสูงสุดที่สามารถกำหนดได้ สำหรับ version 5.1.15 – 5.1.16 [...]