VietNetwork.Vn

 


Tác giả Chủ đề: Increase MySQL connection limit  (Đã xem 1460 lần)

0 Thành viên và 1 Khách đang xem chủ đề.

admin

  • Administrator
  • Hero Member
  • *****
  • Bài viết: 628
  • Số Lần: +94/-0
    • http://vietnetwork.vn
Increase MySQL connection limit
« vào: Tháng Ba 14, 2011, 10:06:41 PM »
Edit the file /etc/my.cnf

The file should look like this:

[mysqld]
set-variable = max_connections=500

Increase 500 to the number you desire.
—————————————–

The default is 100, but sometimes that’s not enough!

For MySQL 3.x:
# vi /etc/my.cnf
set-variable = max_connections = 250

For MySQL 4.x and 5.x:
# vi /etc/my.cnf
max_connections = 250

Restart MySQL once you’ve made the changes and verify with:
echo “show variables like ‘max_connections’;” | mysql
————————————————————-
Set MySQL Connection Count On The Fly – Box Vault

Occasionally you’ll run into a situation in which the connection count you’ve configured for MySQL is too low. This often happens on load balanced applications. You can use the following commands to view and set the connection limit on the fly:

mysql> select @@global.max_connections;
+————————–+
| @@global.max_connections |
+————————–+
|                     1000 |
+————————–+
1 row in set (0.00 sec)

mysql> set @@global.max_connections = 3000;
Query OK, 0 rows affected (0.00 sec)

 8)

-->

server360

  • Administrator
  • Hero Member
  • *****
  • Bài viết: 3162
  • Số Lần: +72/-0
Re: Increase MySQL connection limit
« Trả lời #1 vào: Tháng Bảy 26, 2012, 03:46:11 PM »
 @so1 @so1 @so1 @so1


 

Copyright © VietNetwork.Vn