我需要更改什么httpd conf设置才能增加Apache的最大并发连接数?注意:我关闭了KeepAlive,因为这主要是一个API服务器.
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same …Run Code Online (Sandbox Code Playgroud) 我在运行的网站上有以下错误.我不明白为什么它在我的localhost上工作正常.这与主持人有关吗?我在Unix服务器上.
Warning: mysqli::mysqli() [mysqli.mysqli]: (42000/1203): User dbo343879423 already has more than 'max_user_connections' active connections in /homepages/9/d322397966/htdocs/dump/models/class_database.php on line 11
Connect failed: User dbo343879423 already has more than 'max_user_connections' active connections
Warning: mysqli::close() [mysqli.close]: Couldn't fetch mysqli in /homepages/9/d322397966/htdocs/dump/models/class_database.php on line 160
Run Code Online (Sandbox Code Playgroud)
错误显示'用户dbo343879423已经在第11行的/homepages/9/d322397966/htdocs/dump/models/class_database.php中有超过'max_user_connections'活动连接,所以这是脚本中的第11行 - 我可以'看错了!
$this -> connection = new mysqli($hostname,$username,$password,$database);
Run Code Online (Sandbox Code Playgroud)
下面是class_database.php中的整个类,在脚本的其他部分是不对的,我应该改变?
<?php
#connects the database and handling the result
class __database {
protected $connection = null;
protected $error = null;
#make a connection
public function __construct($hostname,$username,$password,$database)
{
$this -> connection …Run Code Online (Sandbox Code Playgroud)