简体   繁体   English

与MySQL连接的PHP连接数的上限是多少?

[英]What is the upper limit on the number of PHP connections to MySQL connections?

Is the upper limit of the number of connections for the PHP connection database to be placed in the expansion module? PHP连接数据库的连接数上限是否放在扩展模块中? Or by the MySQL database itself is determined by the upper limit of the connection. 或者由MySQL数据库本身决定连接的上限。

Asking because the PHP language is not in the code level to build connection pool, so I am very curious about it is how to limit the number of connections, is not and Java in the connection pool is same, in expansion module (PDO MySQL or mysqli) in limiting the maximum number of connections. 问因为PHP语言不是在代码级别构建连接池,所以我很好奇它是如何限制连接数,不是和连接池中的Java相同,在扩展模块(PDO MySQL或者mysqli)限制最大连接数。

Limit the number of connections your webserver or php-fpm can handle to less than mysql max_connections setting. 将web服务器或php-fpm可以处理的连接数限制为小于mysql max_connections设置。
Or raise mysql max_connections setting above the number of connections that your webserver can handle. 或者将mysql max_connections设置提高到您的Web服务器可以处理的连接数之上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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