简体   繁体   中英

is there a mysql limit as to how many people can request data from database?

I know there is a bandwidth issue with hosting, which is the total amount of resources that can be consumed by site users in a month, but what about mysql connections?

So, if I have enough bandwidth, and I have a php/mysql powered website, and on that website a menu in which each link selects and displays data from the database, is there a limit as to how many different people (computers) can click the same link at the same or around the same time to get the database data, supposing there is enough bandwidth?

假设可能存在限制,因为在某些情况下您的“足够”可能是错误的。

There should be no limit. The only limit may be your server's computing limits.

Yes, the MySQL variable "max_connection" limits how many client connections can be opened to the MySQL server at the same time. You can check the value of this variable with:

show variables like "max_connections";

The default value is 151. You can use the show processlist command to see how many connections are open at the moment.

In practice, this value should be more than enough for a small site with a DB backend. If you find yourself running out of connections, more likely your queries are not optimized and taking too long or hanging.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM