[1040] PDOException in Connection.php line 295

SQLSTATE[HY000] [1040] Too many connections

  1. $this->fetchType = $config['result_type'];
  2. }
  3. try {
  4. if (empty($config['dsn'])) {
  5. $config['dsn'] = $this->parseDsn($config);
  6. }
  7. if ($config['debug']) {
  8. $startTime = microtime(true);
  9. }
  10. $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
  11. if ($config['debug']) {
  12. // 记录数据库连接信息
  13. Log::record('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn'], 'sql');
  14. }
  15. } catch (\PDOException $e) {
  16. if ($autoConnection) {
  17. Log::record($e->getMessage(), 'error');
  18. return $this->connect($autoConnection, $linkNum);
  19. } else {

Call Stack

  1. in Connection.php line 295
  2. at PDO->__construct('mysql:host=127.0.0.1...', 'sql_47_111_75_21', '5HtezwGYrFbBrMtG', [0, 2, 0, ...]) in Connection.php line 295
  3. at Connection->connect() in Connection.php line 995
  4. at Connection->initConnect(false) in Connection.php line 348
  5. at Connection->query('SHOW COLUMNS FROM `s...', [], false, true) in Mysql.php line 65
  6. at Mysql->getFields('`syx_portal_conditio...') in Query.php line 1921
  7. at Query->getTableInfo('syx_portal_condition', 'type') in Query.php line 1969
  8. at Query->getFieldsType('syx_portal_condition') in Query.php line 1975
  9. at Query->getFieldsBind('syx_portal_condition') in Builder.php line 270
  10. at Builder->buildWhere(['AND' => ['pid' => '14']], ['multi' => ['AND' => ['pid' => ['14']]], 'where' => ['AND' => ['pid' => '14']], 'table' => 'syx_portal_condition', ...]) in Builder.php line 240
  11. at Builder->parseWhere(['AND' => ['pid' => '14']], ['multi' => ['AND' => ['pid' => ['14']]], 'where' => ['AND' => ['pid' => '14']], 'table' => 'syx_portal_condition', ...]) in Builder.php line 719
  12. at Builder->select(['multi' => ['AND' => ['pid' => ['14']]], 'where' => ['AND' => ['pid' => '14']], 'table' => 'syx_portal_condition', ...]) in Query.php line 2511
  13. at Query->select() in IndexModel.php line 29
  14. at IndexModel->search_handle(['rs' => '1', 'h_type2' => '563', 'area_local' => '14']) in IndexController.php line 383
  15. at IndexController->search_handle() in IndexController.php line 209
  16. at IndexController->_initialize() in BaseController.php line 37
  17. at BaseController->__construct(object(Request))
  18. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  19. at App::invokeClass('app\portal\controlle...') in Loader.php line 479
  20. at Loader::controller('index', 'controller', true, 'Error') in App.php line 580
  21. at App::module(['portal', 'index', 'house_list'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  22. at App::exec(['type' => 'module', 'module' => ['portal', 'index', 'house_list'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  23. at App::run() in index.php line 79

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty

Session

site
think
{ "host": "xzl_cz" }

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.syx51.com
PATH_INFO
/xzl_cz/1_14_0_0_0_0_0_0_0_0_0_0_0_0_0_0_1/
REDIRECT_STATUS
200
SERVER_NAME
www.syx51.com
SERVER_PORT
443
SERVER_ADDR
172.16.198.36
REMOTE_PORT
56864
REMOTE_ADDR
54.160.243.44
SERVER_SOFTWARE
nginx/1.15.9
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/syx/public
DOCUMENT_URI
/index.php
REQUEST_URI
/xzl_cz/1_14_0_0_0_0_0_0_0_0_0_0_0_0_0_0_1/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/xzl_cz/1_14_0_0_0_0_0_0_0_0_0_0_0_0_0_0_1/
SCRIPT_FILENAME
/www/wwwroot/syx/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711627054.812
REQUEST_TIME
1711627054
Environment Variables
empty

ThinkPHP Constants

APP_DEBUG
true
CMF_ROOT
/www/wwwroot/syx/public/../
APP_PATH
/www/wwwroot/syx/public/../app/
CMF_PATH
/www/wwwroot/syx/public/../simplewind/cmf/
WEB_ROOT
/www/wwwroot/syx/public/
PLUGINS_PATH
/www/wwwroot/syx/public/plugins/
UPLOAD_PATH
upload/
EXTEND_PATH
/www/wwwroot/syx/public/../simplewind/extend/
VENDOR_PATH
/www/wwwroot/syx/public/../simplewind/vendor/
RUNTIME_PATH
/www/wwwroot/syx/public/../data/runtime/
THINKCMF_VERSION
5.0.181231
THINK_VERSION
5.0.24
THINK_START_TIME
1711627054.8125
THINK_START_MEM
423864
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/syx/simplewind/thinkphp/
LIB_PATH
/www/wwwroot/syx/simplewind/thinkphp/library/
CORE_PATH
/www/wwwroot/syx/simplewind/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/syx/simplewind/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/syx/
LOG_PATH
/www/wwwroot/syx/public/../data/runtime/log/
CACHE_PATH
/www/wwwroot/syx/public/../data/runtime/cache/
TEMP_PATH
/www/wwwroot/syx/public/../data/runtime/temp/
CONF_PATH
/www/wwwroot/syx/public/../app/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
HTMLPURIFIER_PREFIX
/www/wwwroot/syx/simplewind/vendor/ezyang/htmlpurifier/library
QINIU_FUNCTIONS_VERSION
7.2.7